Bug 69798 - [Parser] Indexer doesn't like enums
Summary: [Parser] Indexer doesn't like enums
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Andrew Niefer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-11 13:46 EDT by Sebastian Bauer CLA
Modified: 2004-08-10 14:00 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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