From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15683 invoked by alias); 1 Apr 2003 21:56:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 15668 invoked by uid 71); 1 Apr 2003 21:56:00 -0000 Date: Tue, 01 Apr 2003 21:56:00 -0000 Message-ID: <20030401215600.15667.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: c++/8986 Reply-To: Wolfgang Bangerth X-SW-Source: 2003-04/txt/msg00038.txt.bz2 List-Id: The following reply was made to PR c++/8986; it has been noted by GNATS. From: Wolfgang Bangerth To: gcc-gnats@gcc.gnu.org Cc: Giovanni Bajo Subject: Re: c++/8986 Date: Tue, 1 Apr 2003 15:50:18 -0600 (CST) Giovanni incited me to do something inherently useless ;-) Here's a smaller testcase for this horribly broken report: --------------------------------------- namespace NS { struct C {}; namespace NS { template struct X { NS::C foo() const { return NS::C(); } int size() const; X bar(int s) { const int i = s; bogus()->bogus = s; } template void baz() {} X& foobar(int n) { const int x = n; const bool y = n; } }; } } -------------------------------------- It ICEs with present 3.3: g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.ii x.ii:9: error: syntax error before `(' token x.ii:11: error: semicolon missing after declaration of `NS::NS::X< >' x.ii:11: error: extraneous `int' ignored x.ii:11: error: non-member function `NS::NS::X< > NS::NS::size()' cannot have `const' method qualifier x.ii:13: error: syntax error before `(' token x.ii:16: error: ISO C++ forbids declaration of `bogus' with no type x.ii: In function `int NS::NS::bogus()': x.ii:16: error: parse error before `->' token x.ii: In function `void NS::baz()': x.ii:21: error: syntax error before `&' token x.ii:24: error: `n' undeclared (first use this function) x.ii:24: error: (Each undeclared identifier is reported only once for each function it appears in.) x.ii:24: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. I didn't ICE (but spew lots of error messages) in 3.2, so this is a regression. However, given the uselessness of the code (and where it came from) and in particular the fact that it doesn't ICE with present mainline, I only mark it as a regression, but don't increase the priority. W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ices.utexas.edu www: http://www.ices.utexas.edu/~bangerth/