This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Include file path processing change under Cygwin
- From: "Steven L. Zook" <SLZook at Qualstar dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Fri, 22 Oct 2004 16:50:36 -0700
- Subject: Include file path processing change under Cygwin
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.