When TARGET_EXECUTABLE_SUFFIX is specified (ex: Cygwin) and you attempt to precompile a .h file by overriding the default command line to a file with no suffix, gcc.exe will happily, albeit incorrectly, appends TARGET_EXECUTABLE_SUFFIX to the name. In my opinion, it should either leave it blank or append a .gch. In addition regardless of TARGET_EXECUTABLE_SUFFIX, it always puts a space between --output-pch= and the filename when -o is specified. $ t/gcc/xgcc -v -B t/gcc rate.h -o rate ^^^ note no suffix specified Reading specs from t/gcc/specs Configured with: ../gcc-snapshot/configure --enable-sjlj-exceptions --disable-checking --disable-libstdcxx-pch Thread model: single gcc version 3.4 20030716 (experimental) t/gcc/cc1.exe -quiet -v -iprefix /home/kcook34/t/gcc/../lib/gcc-lib/i686-pc-cygwin/3.4/ -isystem t/gcc/include -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D __unix -idirafter /usr/lib/../include/w32api -idirafter /usr/local/lib/../../include/w32api rate.h -quiet -dumpbase rate.h -mtune=pentiumpro -auxbase rate -version -o /tmp/ccdFvehU.s --output-pch= rate.exe ^^^^ note the appended ".exe" s/b nothing or ".gch" ignoring nonexistent directory "/home/kcook34/t/lib/gcc-lib/i686-pc-cygwin/3.4/include" ignoring nonexistent directory "/home/kcook34/t/lib/gcc-lib/i686-pc-cygwin/3.4/../../../../i686-pc-cygwin/include" ignoring nonexistent directory "NONE/include" ignoring nonexistent directory "/usr/local/lib/gcc-lib/i686-pc-cygwin/3.4/include" ignoring nonexistent directory "/usr/local/i686-pc-cygwin/include" ignoring duplicate directory "/usr/include/w32api" #include "..." search starts here: #include <...> search starts here: t/gcc/include /usr/local/include /usr/include /usr/include/w32api End of search list. GNU C version 3.4 20030716 (experimental) (i686-pc-cygwin) compiled by GNU C version 3.4 20030716 (experimental). GGC heuristics: --param ggc-min-expand=31 --param ggc-min-heapsize=4096
I can confirm this in the mainline sources (20030720). The problem is in gcc.c where it processes the -o option and adding TARGET_EXECUTABLE_SUFFIX if it is defined.
not a regression and it looks like no one is fixing this at all.