Community
Participate
Working Groups
For the following code: #define MY_MACRO(i) \ case i: \ { \ break; \ } void f() { int x; switch (x) { MY_MACRO(1) // WARNING HERE } } I get a warning at the indicated line: "No break at the end of this case" However, there is clearly a break there, and hand-substituting the macro expansion makes the warning go away.
Fixed see commit log in Bug 343676
*** cdt cvs genie on behalf of elaskavaia *** Bug 338046 - Bogus warning in macro that resolves to 'case' statement [*] CaseBreakCheckerTest.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/CaseBreakCheckerTest.java?root=Tools_Project&r1=1.7&r2=1.8