This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/6001: g++ problems with nested headers from > egcs-2.91.66 until 3.0.0
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 25 Mar 2002 18:36:01 -0000
- Subject: Re: c++/6001: g++ problems with nested headers from > egcs-2.91.66 until 3.0.0
- Reply-to: Neil Booth <neil at daikokuya dot demon dot co dot uk>
The following reply was made to PR c++/6001; it has been noted by GNATS.
From: Neil Booth <neil@daikokuya.demon.co.uk>
To: Mario Deilmann <Mario.Deilmann@pallas.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/6001: g++ problems with nested headers from > egcs-2.91.66 until 3.0.0
Date: Mon, 25 Mar 2002 18:26:25 +0000
Mario Deilmann wrote:-
> You never should say there are no bug in a specific software ;).
I'm quite sure there are no bugs in this part of CPP. People use it in
millions of situations every day.
> > You should investigate what the issue is. Have you created preprocessed
> > source and examined it? Have you created preprocessed source with a
> > compiler that works and examined it? I bet there's a difference, and we
> > need to know what is causing it.
>
> I did some investigations. Before I send you the bug report I tested the
> problem with various compilers on different platforms and what I observed
> was that the error only occured with versions of gcc. Then I modified the
> source only by changing the include sequence and after this all gcc
> versions had no problem any more. I want to tell the gcc people about this
> so I send the bug report. I have of course limited time to investigate
> on a problem where I have a workaround for and the different include
> sequences I generated with your help don't tell anything to me and I
> definetly don't have the time to look in the cpp source code. Sorry !
I'm not asking you to look into the cpp source code. I'm asking you
for *preprocessed source*. You haven't sent it. It's the output of -E.
> You don't need to replicate my system. With the source code example I send
> you you could replicate the error on a lot of systems.
I can't, on g++ on Linux I get:
$ g++ -c -Wall buffer.cpp
buffer.cpp: In method `char TSourceBuffer::GetLine()':
buffer.cpp:137: warning: unused variable `int lineNumber'
$
in both directories error/ and no-error/ of your tarball.
> I only tested 4 but
> I'm sure there are a lot more. The problem occured only with versions of
> gcc (and to be honest with the Intel Compiler on Linux too) but all other
> C++ Compiler I used didn't find a problem or even a bug (I tested CC on
> Solaris, KCC on Linux, pgiCC on Linux, Visual C on Windows, CC on Compaq
> Alpha and KCC on Solaris) AND when I changed the sequence of the includes
> the error in the system header disappeared with all gcc versions and with
> the Intel Compiler. So in my opinion from this investigation it's too easy
> to say this is a user bug !
>
> > Have you created the preprocessed source? Can you send it to me?
> > Can you send me the preprocessed source from a compiler that works?
>
> Sure. See below ....
No, that is not preprocessed source. You sent me the include trace,
which was *completely different for the two compilers*. How can you
expect to get the same result when the compilers are reading different
header files?
Neil.