This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
File: CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp Errors: CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp 1 unexpected token: <no text> Expected error: CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp 4 Unable to resolve identifier e1. Expected error: CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp 6 Unable to resolve identifier e2. Expected error: CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp 9 Unable to resolve identifier g.
Code: // RUN: %clang_cc1 -fsyntax-only -verify %s struct A { }; A::A (enum { e1 }) {} // expected-error{{can not be defined in a parameter}} \ // expected-error{{out-of-line definition}} void A::f(enum { e2 }) {} // expected-error{{can not be defined in a parameter}} \ // expected-error{{out-of-line definition}} enum { e3 } A::g() { } // expected-error{{can not be defined in the result type}} \ // expected-error{{out-of-line definition}}
Probably we shouldn't fix it because enums/class/unions cannot be defined inside parameters and return types. Maybe if we are talking only about syntax there is a problem, but in the real code nothing like that could happen.