Bug 69798

Summary: [Parser] Indexer doesn't like enums
Product: [Tools] CDT Reporter: Sebastian Bauer <mail>
Component: cdt-parserAssignee: Andrew Niefer <aniefer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Sebastian Bauer CLA 2004-07-11 13:46:55 EDT
The indexer complains about the following code fragments (it detects a syntax 
error).

---

enum Flags
{
	FLAG1,
	FLAG2
};

int test(void)
{
	int a,b;

	a = 0;
	b = (a?FLAG1:0)|FLAG2;
	
	return b;
}

int main(void)
{
	return 0;
}

---

It doesn't like the "b" assignment.
Comment 1 Andrew Niefer CLA 2004-07-12 14:55:39 EDT
fixed conversion of enumeration to int 

a bug in there caused problem with getting the result type of the expression 
a ? FLAG1 : 0
Comment 2 Andrew Niefer CLA 2004-07-12 14:56:04 EDT
oh yeah, and the fix is in the HEAD branch
Comment 3 Sebastian Bauer CLA 2004-07-12 19:08:43 EDT
Thanks. Works now.
Comment 4 Andrew Niefer CLA 2004-08-10 14:00:13 EDT
fix is now in 2.0.1