This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in preprocessor which be integrated with C++ frontend
- To: Dave Raggett <dave_raggett at hotmail dot com>
- Subject: Re: Bug in preprocessor which be integrated with C++ frontend
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Fri, 16 Feb 2001 08:32:30 +0000
- Cc: gcc at gcc dot gnu dot org
- References: <F178Ut65BVEpVRqOdtC0000e4f1@hotmail.com>
Dave Raggett wrote:-
> Take a look at this file (~/test/test.cpp)
>
> #ifndef __TEST_CPP__
> #define __TEST_CPP__
> #include "../test/test.cpp"
> #endif
>
> I found it will be read twice in preprocessor that integrated with C++
> frontend.
> But if i use #include "./test.cpp",it will be cached and only be read once.
I wouldn't call that a bug - it still works fine, right?
The "problem" is that CPP doesn't try to interpret path names; it just
compares (simplified) strings. This is probably best, otherwise I suspect
things might get really hairy what with symbolic links and the like.
I also don't think this is an integrated CPP issue, is it? I suspect stand-
alone CPP acts in exactly the same way (and probably always has done).
Neil.