Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1068 Newest gcc mixes up STL headers with local folders

OTHER
closed
Danny Smith
gcc (462)
duplicate
Duplicate
2013-02-01
2007-08-11
No

Nota: happens under vista, but I'm pretty sure it also happened under Windows 2000. Due to what I think is called the stat bug (whereby the frontends are unable to find cc1plus.exe and cc1.exe), I do put cc1.exe and cc1plus.exe from the libexec folder of g++ 4.2.1 into the /mingw/bin folder.

Create a program such as:
#include <map>
int main(void) { return 0; }

Now, compile it with such command-line as:
g++ -I. -Wall -c -o t.o t.cpp

You can try this with the regular g++-3.4.5 or the new g++-4.2.1 announced by D. Smith (in my case the sjlj one). Both should work fine.

Now, create a "map" folder where the .cpp is:
mkdir map

Test the 2 g++ versions. The 3.4.5 should be fine, while g++-4.2.1 will report:
t.cpp:1:15: error: ./map: Permission denied

This not limited to map: any header whose name can be mistaken for an existing folder, will be.

Discussion

  • Obvious 2-liners test source code

     
    Attachments
  • Danny Smith
    Danny Smith
    2007-08-12

    • status: open --> closed-duplicate
     
  • Earnie Boyd
    Earnie Boyd
    2013-02-01

    • status: closed-duplicate --> closed
    • resolution: --> duplicate
    • category: --> Duplicate
    • milestone: --> OTHER