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.
Combining C++11 typed enums and visibility attributes, will make netbeans to think the whole syntax is incorrect. You can test with this sample code: #define PUBLIC __attribute__ ((visibility ("default"))) #define PRIVATE __attribute__ ((visibility ("hidden"))) enum LogLevel:unsigned short PUBLIC { LogLevel_Emergency = 0, // system is unusable LogLevel_Alert = 1, // action must be taken immediately LogLevel_Critical = 2, // critical conditions LogLevel_Error = 3, // error conditions LogLevel_Warning = 4, // warning conditions LogLevel_Notice = 5, // normal, but significant, condition LogLevel_Info = 6, // informational message LogLevel_Debug = 7 // debug-level message }; And see the items and the enum name marked in red. If you remove the macro PUBLIC, it is detected correctly though.
Note that by saying that removing the PUBLIC macro makes the error go away, I am implying that I enabled c++11 parsing in my project.
I have to say that it works however for code like: enum PUBLIC LogLevel:unsigned short However, both versions are valid C++11 code, so both should be accepted by code parser.
Fixed in http://hg.netbeans.org/cnd-main/rev/834a6d1fddc5
Integrated into 'main-silver', will be available in build *201607130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/834a6d1fddc5 User: Petr Kudryavtsev <petrk@netbeans.org> Log: Fixed #254133 - C++11 enums with visibility makes netbeans think the syntax is incorrect