No Subject

Adrian Bowyer A.Bowyer@bath.ac.uk
Thu Oct 29 06:39:00 GMT 1998


Hi - a little problem with the gnu C++ compiler.  Attached are a minimal test 
program and a (non-minimal...) .h file.

Compiling as it stands gives

$ g++ -c gpp_test.cxx
In file included from gpp_test.cxx:1:
gpp_bug.h:204: Internal compiler error 9.
gpp_bug.h:204: Please submit a full bug report to `egcs-bugs@cygnus.com'.
$

Correcting the code (i.e. comment out line 204 and uncomment line 200 in the 
.h file) gives

$ g++ -c gpp_test.cxx
In file included from gpp_test.cxx:1:
gpp_bug.h:200: warning: friend declaration `class sv_linked_list<D> merge(const 
class sv_linked_list<D> &, const class sv_linked_list<D> &)'
gpp_bug.h:200: warning:   will not be treated as a template instantiation
gpp_bug.h:200: warning:   unless you compile with -fguiding-decls
gpp_bug.h:200: warning:   or add <> after the function name
$

I chose to follow the last line of that advice, which provoked the internal 
error 9.  Then I used -fguiding-decls, which works fine, so I'm OK.  But
I thought that I ought to follow the request and submit a full bug report to 
egcs-bugs@cygnus.com...

I'm running Linux Redhat 5.1, though I get the same results from g++ on a Sun 
running System V Release 4.0.  Compiling the erroneous program using CC on an 
SGI running IRIX 6.2 gives sensible error messages.


Best wishes

Adrian

_________________________________________________________________________
                                     |
Dr Adrian Bowyer                     |        email - A.Bowyer@bath.ac.uk   
Senior Lecturer                      | web - http://www.bath.ac.uk/~ensab
Department of Mechanical Engineering | telephone - +44 1225 826826 x 5453
Faculty of Engineering and Design    |              fax - +44 1225 826928
University of Bath                   |
Bath BA2 7AY                         |
UK                                   |
_____________________________________|___________________________________

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpp_bug.h
Type: text/x-c++
Size: 3544 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19981029/fee2a092/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpp_test.cxx
Type: text/x-c
Size: 31 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19981029/fee2a092/attachment-0001.bin>


More information about the Gcc-bugs mailing list