CC ?= clang
-CFLAGS += -Wall -I. -pedantic-errors -std=c90 -Wno-attributes
+CFLAGS += -Wall -I. -pedantic-errors -std=c90
+
+#turn on tons of warnings if clang is present
+ifeq ($(CC), clang)
+ CFLAGS += \
+ -Weverything \
+ -Wno-missing-prototypes \
+ -Wno-unused-parameter \
+ -Wno-sign-compare \
+ -Wno-implicit-fallthrough \
+ -Wno-sign-conversion \
+ -Wno-conversion \
+ -Wno-disabled-macro-expansion \
+ -Wno-padded \
+ -Wno-undef \
+ -Wno-conditional-uninitialized \
+ -Wno-missing-noreturn \
+ -Wno-ignored-qualifiers \
+ -Wno-unused-macros \
+ -Wno-format-nonliteral \
+ -Wno-shadow
+
+endif
OBJ = lex.o \
error.o \
parse.o \
clean:
rm -f *.o gmqcc test_ast test_ir test/*.o
+
+
if (util_strncmpexact(&argv[1][1], "memchk", 6)) { opts_memchk = true; break; }
if (util_strncmpexact(&argv[1][1], "help", 4)) {
return usage(app);
- break;
}
/* compiler type selection */
if (util_strncmpexact(&argv[1][1], "std=qcc" , 7 )) { opts_compiler = COMPILER_QCC; break; }