Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions generator/c/c_generator.c2
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,11 @@ const char[] Warning_control =
# pragma clang diagnostic ignored "-Wsometimes-uninitialized"
# pragma clang diagnostic ignored "-Wtypedef-redefinition"
# pragma clang diagnostic ignored "-Wstring-plus-int"
# pragma clang diagnostic ignored "-Wunused"
# pragma clang diagnostic ignored "-Wswitch"
# pragma clang diagnostic ignored "-Wunused-parameter"
# pragma clang diagnostic ignored "-Wmissing-field-initializers"
# pragma clang diagnostic ignored "-Wformat-zero-length"
# if (__clang_major__ >= 10)
# define fallthrough __attribute__((fallthrough))
# endif
Expand All @@ -1405,12 +1410,17 @@ const char[] Warning_control =
# define fallthrough __attribute__((fallthrough))
# endif
# pragma GCC diagnostic ignored "-Wmain"
# pragma GCC diagnostic ignored "-Wunused"
# pragma GCC diagnostic ignored "-Wswitch"
# pragma GCC diagnostic ignored "-Wunused-parameter"
# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
# if (__GNUC__ >= 10)
# pragma GCC diagnostic ignored "-Wzero-length-bounds"
# endif
# if (__GNUC__ >= 7)
# pragma GCC diagnostic ignored "-Wformat-overflow"
# pragma GCC diagnostic ignored "-Wstringop-overflow"
# pragma GCC diagnostic ignored "-Wformat-zero-length"
# endif
#endif

Expand Down
4 changes: 1 addition & 3 deletions generator/c/c_generator_special.c2
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ fn void Generator.createMakefile(Generator* gen,

out.print("CC?=%s\n", cc);

out.add("CFLAGS+=-Wall -Wextra -Wno-unused -Wno-switch\n");
out.add("CFLAGS+=-Wno-unused-parameter -Wno-missing-field-initializers -Wno-format-zero-length\n");
out.add("CFLAGS+=-pipe -std=c99 -funsigned-char\n");
out.add("CFLAGS+=-Wall -Wextra -pipe -std=c99 -funsigned-char\n");
if (gen.fast_build)
out.add("CFLAGS+=-O0 -g\n");
else
Expand Down
Loading