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

Bug 69526

Summary: [Parser] CDT parse failures on C function-like macro definition with no parameters
Product: [Tools] CDT Reporter: Sebastien Marineau <sebastien>
Component: cdt-parserAssignee: John Camelon <john.camelon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Sebastien Marineau CLA 2004-07-07 16:41:07 EDT
The following code will reproduce the issue:

unsigned inkernel;
#define lock_kernel() (inkernel |= 0x01)

int main(int argc, char **argv) {
	
	lock_kernel();

}

The parser will report a syntax error on the "lock_kernel()" macro.
Comment 1 John Camelon CLA 2004-07-15 11:16:50 EDT
These defects will be addressed once we move to the new Scanner implementation 
we are working on in the HEAD.
Comment 2 John Camelon CLA 2004-08-06 11:48:48 EDT
This is actually a parser bug ... ( inkernel | 0x01 ); is not parsing as an 
expression statement. 
Comment 3 John Camelon CLA 2004-09-20 21:28:26 EDT
This bug got fixed somewhere along the way. 
I have committed a JUnit test validating it for both HEAD & AST2 branches.
Comment 4 John Camelon CLA 2004-10-28 15:13:23 EDT
These bugs all were fixed in the HEAD, so they're effectively fixed in 2.1.