Description of problem: g++ fails to compile STL headers in trivial code when the -I flag is used to include a file named debug/debug.h Version-Release number of selected component (if applicable): gcc-3.4.2-6.fc3 How reproducible: always Steps to Reproduce: 1. Create trivial C++ program, e.g. x.cc: #include <iostream> int main(int ac, char* av[]) { return 0; } 2. Create spurious debug.h file: mkdir debug; cd debug; echo "" > debug.h; cd .. 3. g++ -I. x.cc The contents of the debug.h file and its location is irrelevant, as long as it resides in a directory called debug. Actual results: Compilation failed with errors within STL headers. Expected results: Normal compilation. Additional info:
Created attachment 106627 [details] Error output from failed compilation.
Eh, you of course cannot override any of the standard headers or headers they are using, otherwise the behaviour is undefined. If you say mkdir bits; echo > bits/types.h and use -I., nothing will compile either. Read the standards on what they say about this case.
OK. I didn't realize that the standard headers would be overriden in this way, since it didn't happen with previous versions of GCC (at least in the code I compile). Thanks.