I am interested in looking at the GCC loop optimization. There are some tree dump flags that are registered (via register_dump_files() in tree-optimize.c). In particular, -fdump-tree-loopinit-raw and -fdump-tree-loopdone-raw that generate warnings when they should not. Specifically:
gcc -O3 -S -fdump-tree-loopinit-raw short.c The problem is that there is also -fdump-tree-loop-raw as well, and "loop" is a prefix of "loopinit" and "loopdone". The function dump_switch_p_1() in tree- dump.c calls skip_leading_substring() which works correctly for "loopinit" but then skips only the first four bytes when processing "loop". This leaves "init" dangling, and generates: cc1: warning: ignoring unknown option 'init' in '-fdump-tree-loop' Same for "done" of course. No need to do -save-temps or look at any of the compiler output - this happens before any processing of the input file (a 4-line C program will suffice). Also, no urgency because the --first-- encounter where it does match the entire option works, so you do get the requested dumps, just the incorrect warning. -- Summary: Certain flags generate warnings when they should not. Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wmahoney at unomaha dot edu CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20061