[Bug c++/22054] New: GCC doesn't support anonymous subclass

shuki_duv at yahoo dot com gcc-bugzilla@gcc.gnu.org
Mon Jun 13 20:08:00 GMT 2005


struct A {};
struct : A {} b;

This fails with
:2: error: parse error before `:' token
:2: error: ISO C++ forbids declaration of `b' with no type

See definition of class-head in section 9-1 of 14882:1998 standard.

gcc version 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1,
ssp-3.3.5.20050130-1, pie-8.7.7.1)

-- 
           Summary: GCC doesn't support anonymous subclass
           Product: gcc
           Version: 3.3.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: shuki_duv at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list