| Summary: | Binary bitwise & expression parsed as Cast Expression | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Andrew Niefer <aniefer> |
| Component: | cdt-parser | Assignee: | Project Inbox <cdt-core-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
This is an ambiguity. If field was a type rather than an parm passed in, it could even be valid. Future means you commit to fix it in the Future. Inboxes can't make committments. Moving to '--'. Created testcase AST2Tests.testBug100641_106279_castAmbiguity(). Fixed with bug 168924. *** This bug has been marked as a duplicate of bug 168924 *** |
void isTrue( int field, int bit ){ return ( (field) & (bit) ); } The (field) & (bit) is being parsed as a cast expression instead of as a binary expression. This was found in the DOTL project (http://sourceforge.net/projects/dotl/) where it takes the form of a macro #define IS_SET(flag,bit) ((flag) & (bit))