c++/6001: g++ problems with nested headers from > egcs-2.91.66 until 3.0.0
Mario Deilmann
Mario.Deilmann@pallas.com
Wed Mar 20 01:46:00 GMT 2002
The following reply was made to PR c++/6001; it has been noted by GNATS.
From: Mario Deilmann <Mario.Deilmann@pallas.com>
To: Neil Booth <neil@daikokuya.demon.co.uk>
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: Wed, 20 Mar 2002 10:41:11 +0100 (MET)
Dear Neil,
thanks for your fast response.
I tried gcc -E -H on both files and there are a LOT of differences (about
1200). I have looked into the differences and most of them obviously are
caused by the different include sequence.
I have no idea where I should look for the important differences ? Any
idea ?
I have included the differences files ddiff:
The 1st error was:
/home/mdeil/bin/../include/g++-v3/sparc-sun-solaris2.7/bits/basic_file_model.h:
In constructor `std::__basic_file<_CharT>::__basic_file(std::__c_lock*)':
/home/mdeil/bin/../include/g++-v3/sparc-sun-solaris2.7/bits/basic_file_model.h:39:
parse error before `;' token
poohmak1/orig> grep -i -n "basic_file_model" ddiff
2085:> .....
/home/mdeil/bin/../include/g++-v3/sparc-sun-solaris2.7/bits/basic_file_model.h
2088:< __bas....
/home/mdeil/bin/../include/g++-v3/sparc-sun-solaris2.7/bits/basic_file_model.h
Mmh, what does this tell me ?
Viele Gruesse / Best Regards
-- Mario
Mario Deilmann
Senior Sales Engineer
--------------------------------------------------------------------
//// pallas
Pallas GmbH / Hermuelheimer Str. 10 / 50321 Bruehl / Germany
Mario.Deilmann@pallas.com / www.pallas.com
Tel +49-2232-1896-31 / Fax +49-2232-1896-29
--------------------------------------------------------------------
On Tue, 19 Mar 2002, Neil Booth wrote:
> mdeil@pallas.de wrote:-
>
> > I found some strange behaviour with some of the g++ versions greater than 2.91 on different platforms with a small C++ code (included)
> > I investigated a little more and found out that in my opinion the program was badly coded. The header files included each others and also some of the system headers. So I cleaned up all headers so that there are no more
> > includes in the header files. Collected the used system and program header's and added the std namespace. Wow, what a suprise now all gcc versions include 3.0 accepts the code.
> >
> > Can you give me some insight's what makes this program so PRBLEMATIC are this ANSI/ISO feature problems ? All compilers that produce errors find them in their own include files which confuses me. I thought that the problems should be located in the original source code.
>
> We cannot debug this easily for you. However, you can probably get a deeper
> understanding of what is happening with the -H option. Please compare
> the output of gcc -E -H yourfile.c between the two compilers, and see
> where they diverge. It generates an include stack trace.
>
> Let us know if we can close this PR.
>
> Neil.
>
More information about the Gcc-prs
mailing list