Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365477

Summary: Code Analysis reports non existing problems.
Product: [Tools] CDT Reporter: Ventsy <ventsyv>
Component: cdt-buildAssignee: cdt-build-inbox <cdt-build-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.1.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ventsy CLA 2011-12-02 15:02:58 EST
Build Identifier: 20110916-0149

Code compiles OK from command line, but hundreds of Code Analysis problems are reported by Eclipse. This happens occasionally, but I'm not sure what's causing it.

Reproducible: Didn't try

Steps to Reproduce:
1. Import a C++ project from existing code with a makefile
2. Code might compile fine both in Eclipse and under command line. Code is under version control
3. Unknown event occurs (try compiling different projects assigned to their own sets, switching between sets etc)
4. Code still compiles from command line, but in Eclipse, hundreds of code analysis errors will be shown.
Doing a clean build does not help either. Rebuilding the index, followed by a clean build seems to fix it.
Comment 1 Ventsy CLA 2011-12-02 15:07:12 EST
Actually, opening a source file after a build (and re-indexing) would cause the code analysis errors to come back.
Comment 2 Ventsy CLA 2011-12-08 11:22:02 EST
After some investigating, I found out that Eclipse "forgot" the include paths (such as /usr/include etc). Deleting the project and importing it again using the "From existing code with make file" wizard did not fix the problem. 
I think the wizard should parse the make file and extract all -I -i paths and import them in the project. 

Manually adding the folders in the project and rebuilding the index still resulted in errors.
Comment 3 Markus Schorn CLA 2011-12-22 05:45:30 EST
Most likely the compiler inspection did not work. Try to configure it in the project properties under 'C/C++ Build - Discovery options'.