Created
December 8, 2008 18:23
-
-
Save mkhl/33547 to your computer and use it in GitHub Desktop.
GCC flags and stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Wall | |
-Wextra | |
-Wfloat-equal | |
-Wpointer-arith | |
-Wstrict-prototypes | |
-Wold-style-definition | |
-Wshadow | |
-Wshorten-64-to-32 | |
-Wmissing-prototypes | |
-Wunused-function | |
-Wunused-label | |
-Wunused-parameter | |
-Wunused-value | |
-Wunused-variable | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# display all of GCC's predefined #defines | |
echo | gcc -dM -E -x c - | sort | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ENV['ANAL'] or ENV['DOMAIN'] =~ /zenspider/ then | |
builder.add_compile_flags "-Wall" | |
builder.add_compile_flags "-W" | |
builder.add_compile_flags "-Wpointer-arith" | |
builder.add_compile_flags "-Wcast-qual" | |
builder.add_compile_flags "-Wcast-align" | |
builder.add_compile_flags "-Wwrite-strings" | |
builder.add_compile_flags "-Wmissing-noreturn" | |
builder.add_compile_flags "-Wno-long-long" | |
# NOTE: this flag doesn't work w/ gcc 2.95.x - the FreeBSD default | |
# builder.add_compile_flags "-Wno-strict-aliasing" | |
# ruby.h screws these up hardcore: | |
# builder.add_compile_flags "-Wundef" | |
# builder.add_compile_flags "-Wconversion" | |
# builder.add_compile_flags "-Wstrict-prototypes" | |
# builder.add_compile_flags "-Wmissing-prototypes" | |
# builder.add_compile_flags "-Wsign-compare" | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment