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 gdr at integrable-solutions dot net  2004-01-09 14:11 -------
Subject: Re:  [3.4 Regression] ICE (illegal code) at cp/friend.c:200

"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:

| Gaby,
| 
| which DR are you referring to? There is an old DR (360 IIRC) which says that we 
| don't need typename in elaborated type specifiers, thus allowing:
| 
| friend class T::X;

I don't have the exact number.  But in the pre-Kona2003 mailing, there
is a paper by Mike Miller on this issue, which was discussed by both
the Evolution Group and the Core Group; Core adopted a slightly
different version of the resolution adopted by Evolution.  But the
point of the resolution is to allow friend typename T::X.
If you allow friend class T::X and X turns out to be a union, you
get another trouble because every class shall be declared with the 
consistent class-key.  The resolution went further to allow

   friend T;

where T is a template parameter.  
(My laptop was stolen yesterday and I don't have reference here me,
but the document must be on the WG21 website)

-- Gaby


-- 


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]