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.
Created attachment 158213 [details] Project file to reproduce bug Based on request: https://netbeans.org/bugzilla/show_bug.cgi?id=256285#c10 One way I find to reproduce this bug is set "C/C++"->"other"->"Default standard" to C++98 for header and c++ files. With this after reopening whole IDE some files are get treated as C++98 not as C++11 based on "-std=gnu++11" command line option. Overall I can have opposite situation. When set C++11 as default and setting C++98 in project, headers files are still treat as C++11.
The problem occurs when Welcome Page is disabled on reopen IDE. In this case header file can: 1) be opened before configuration.xml is loaded => NativeProject can be detected, but not NativeFileItem so default language for mime-type is selected 2) when configuration descriptor is finished loading there is no listened notification about that event 3) Even adding this event listening doesn't solve problems if code model project is not going to be parsed, but up-to-date check would skip this file. This module doesn't depend on Code Model API, so CsmListeners.getDefault().addModelListener(listener); CsmListeners.getDefault().addProgressListener(progressListener); is not used to listen CsmProject loading or file-parse finished Workaround: leave welcome page opened (Help->Start Page) and wait till all projects are loaded by IDE.
After upgrading to 8.2 behaviour changed that it always use C++98 in bugged files even when globals are set to C++11. In 8.1 this bug was unobservable for me because I have same global and project settings.