This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]