Skip to content

Instantly share code, notes, and snippets.

@tosihisa
tosihisa / gcc_warn_query.awk
Created May 3, 2012 12:47
gcc の警告オプションを調べてみた。
#!/usr/bin/gawk -f
#http://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html
BEGIN {
gcc_cmd="gcc -Q --help=warnings,^joined,^undocumented";
w_lv[0] = "";
w_lv[1] = "-Wall";
w_lv[2] = "-Wall -Wextra";
for(i = 0;i < 3;i++){
cmdln = sprintf("%s %s",gcc_cmd,w_lv[i]);