| Summary: | [Parser] CDT parse failures on C function-like macro definition with no parameters | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Sebastien Marineau <sebastien> |
| Component: | cdt-parser | Assignee: | 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: | |||
These defects will be addressed once we move to the new Scanner implementation we are working on in the HEAD. This is actually a parser bug ... ( inkernel | 0x01 ); is not parsing as an expression statement. This bug got fixed somewhere along the way. I have committed a JUnit test validating it for both HEAD & AST2 branches. These bugs all were fixed in the HEAD, so they're effectively fixed in 2.1. |
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.