[Bug c++/22378] [regression 4.0.1 -> 4.0.0,3.4.x] Friend decl ceases to declare class

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jul 8 19:54:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-08 19:53 -------
The code is in fact invalid.

friend should not inject the class at all.

The reason why we did not have a deprecated period or allow it with -fpermissive is because we 
actually got a bug report about accepting this invalid code.

Just add the forward declaration.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22378



More information about the Gcc-bugs mailing list