This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jan 2004 07:13:51 -0000
- Subject: [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
- References: <20040103211215.13558.pommier@gmm.insa-tlse.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-04 07:13 -------
Note also this testcase ICE in the same place and the patch fixes it also:
class bar { friend int; };
The error messages after for the testcase here:
pr13558.cc:1: error: a class-key must be used when declaring a friend
pr13558.cc:1: error: invalid type `int' declared `friend'
For the one in comment #0:
pr13558.cc:1: error: expected identifier
pr13558.cc:1: error: invalid type `int' declared `friend'
I think this is okay error messages and better than what 3.3 gave:
above:
accepted it but warned:
pr13558.cc:1: warning: friend declaration requires class-key, i.e. `friend int'
one in comment #0:
pr13558.cc:1: error: expected identifier
pr13558.cc:1: error: invalid type `int' declared `friend'
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558