Include file path processing change under Cygwin
Steven L. Zook
SLZook@Qualstar.com
Sat Oct 23 12:47:00 GMT 2004
I am using m68k-elf hosted on Cygwin. Being used to typing in paths
using '\' instead of '/', I have the following test case:
Base/A/A.cpp contains
// Base/A/A/A.cpp
#include "..\A.hpp"
Base/A/A.hpp contains:
// Base/A/A.hpp
#include "..\B\B.hpp"
Base/B/B.hpp contains
// Base/B/B.hpp
When I compile, in the Base/A/A directory, the A.cpp file using revision
3.3.3 and the command line "m68k-elf-gcc -C -E a.cpp", I get:
# 1 "a.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "a.cpp"
// Base/A/A/A.cpp
# 1 "../A.hpp" 1
// Base/A/A.hpp
# 1 "../../B/B.hpp" 1
// Base/B/B.hpp
# 3 "../A.hpp" 2
# 3 "a.cpp" 2
Which is correct.
When I compile, in the Base/A/A directory, the A.cpp file using revision
3.4.2 and the command line "m68k-elf-gcc -C -E a.cpp", I get:
# 1 "a.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "a.cpp"
// Base/A/A/A.cpp
# 1 "..\\A.hpp" 1
In file included from a.cpp:2:
..\A.hpp:2:22: ..\B\B.hpp: No such file or directory
// Base/A/A.hpp
# 3 "a.cpp" 2
If I change all the '\'s in the files to '/'s, it works properly in both
revisions.
Has the processing of the "" form of the include changed intentionally
to result (probably indirectly) in this or is this a regression?
Obviously I need to use '/'s in the includes, which they should have had
in the first place.
More information about the Gcc
mailing list