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.

Bug 257670 - C++11 project use default C++98 settings for files
Summary: C++11 project use default C++98 settings for files
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.2
Hardware: PC Other
: P3 normal with 1 vote (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-22 01:22 UTC by Yankes
Modified: 2016-10-10 11:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Project file to reproduce bug (11.79 KB, application/x-download)
2016-01-22 01:22 UTC, Yankes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yankes 2016-01-22 01:22:08 UTC
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.
Comment 1 Alexander Simon 2016-01-27 10:04:56 UTC
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.
Comment 2 Yankes 2016-10-07 20:41:00 UTC
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.