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.
Summary: | C++ Code assistance incorrectly marks "unable to resolve identifier" in two-namespace files with std class members | ||
---|---|---|---|
Product: | editor | Reporter: | hmunozb |
Component: | Hints & Annotations | Assignee: | petrk |
Status: | NEW --- | ||
Severity: | normal | CC: | Cube_, vijer |
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Windows 10 x64 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Unable to resolve identifier Example |
Description
hmunozb
2014-11-26 03:37:47 UTC
This issue is not restricted to namespaces. For years netbeans has reported false errors on statements. An example is given below. Each release seems to report false errors, with some releases more faulty than others. I have reported this issue several times over the last several years. In asperity I ask if there is any way to correct these faulty error? They are distracting and (in their multitude) shield other errors worthy of consideration. size_t xstride = 1; // netbeans reports "Unable to resolve identifier xstride" // and no other errors in the file. art This continues to be a problem in NetBeans 8.2. I added a new C++ project: File >> New Project >> C++ >> C++ Application and used the default C++ for create main. When I open the main.cpp this code is already in the file int main(int argc, char** argv) { return 0; } and NetBeans 8,2 highlights main, argc, and argv with red squiggles and says it is "unable to resolve identifier main, etc." Really? If I add more code like: int var1 = 1; NetBeans 8.2 reports "unable to resolve identifier var1." Really? I just declared it! As the original post states it is distracting and makes it difficult to see actual errors. I have checked all of the C++ Code Assistance settings and they are valid. The code compiles without issue. Please fix this bug. Created attachment 164776 [details]
Unable to resolve identifier Example
Clean install of Windows 10
Clean install of jdk-8u131-windows-x64
Clean install of cgywin64
Clean install of Netbeans 64
Still get this error on every C++ file
I have been using netbeans for an introductory C programming class. One of my students has this issue persistently. So far re-installing, etc., has not resolved the issue. I and one other student have encountered this briefly, but in both cases simply restarting netbeans cleared it up. I recall a message about updating tools after the restarts. For the student with the persistent problem, just restarting netbeans obviously is not fixing it. I do not have regular access to the student's laptop to readily do further troubleshooting. In all cases this has been on Win10x64 systems. And to clarify: the compiler has no problem with the source files -- they build and run normally. It is the editor or a plugin which is intended to detect errors on the fly which is incorrectly flagging all or nearly all symbols as unresolved. I'll that we're doing C, not C++, but I don't think it makes a difference. This also happens for me, albeit only for vectors. this sample code reliably reproduces the defect (on my machine): #include <vector> int someFunc() { std::vector<int> someVector { 0 }; } additionally here is a screenshot of the bug in effect https://i.imgur.com/Wtuw88N.png (whether you review said screenshot is at your discretion, naturally - resolution 303x182px) Unfortunately, it is not possible to fix it now, because C/C++ part has not moved to Apache yet. You can track the progress here: https://cwiki.apache.org/confluence/display/NETBEANS/Apache+Transition |