Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356761 - Compiler symbols do not make the right active/inactive code
Summary: Compiler symbols do not make the right active/inactive code
Status: CLOSED DUPLICATE of bug 313944
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-06 03:12 EDT by Erwin Mueller CLA
Modified: 2011-09-06 04:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erwin Mueller CLA 2011-09-06 03:12:31 EDT
Build Identifier: 20110615-0604

I'm using different build configurations for my C project, and for different configurations I have symbols like LINUX or WINDOWS active. 

But if I choose a different configuration the inactive code stays the same, i.e. the code is with gray background color. But the compiler will compile the right code and the editor will highlight the right compiler errors in the text (it will compile the gray inactive code and it will show compiler errors in the gray code).

Reproducible: Always

Steps to Reproduce:
1. Create 2 configurations, configuration A with symbol LINUX, configuration B with symbol WINDOWS
2. Create code with #ifdef LINUX xxx and #ifdef WINDOWS xxx
3. switch to configuration A
4. code inside the #ifdef WINDOWS is marked as inactive and code inside #ifdef LINUX is active
5. switch to configuration B
6. code inside the #ifdef WINDOWS is still marked as inactive, but will compile
Comment 1 Anton Leherbauer CLA 2011-09-06 04:25:17 EDT

*** This bug has been marked as a duplicate of bug 313944 ***