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]

c++/7065: unnamed derived classes/structs are rejected


>Number:         7065
>Category:       c++
>Synopsis:       unnamed derived classes/structs are rejected
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 18 06:06:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Daniel Frey
>Release:        gcc-3.1
>Organization:
>Environment:
gcc 3.1, linux, pc
>Description:
The following code is legal:

class A {};
class : A {}; // unnamed class
int main() {}

But it is rejected with:

t.cc:2: parse error before `:' token
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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