Community
Participate
Working Groups
#define DEFINE_BREAK {break;} void foo ( int a ) { switch ( a ) { case 1: DEFINE_BREAK // <-- Warning: No break at the end of this case } } There is no warning if DEFINE_BREAK is defined without braces ("#define DEFINE_BREAK break;") or if "{break;}" is written in switch directly.
Fixed as result of re-writing checker, see commit log in Bug 343676
*** cdt cvs genie on behalf of elaskavaia *** Bug 339802 - [fp] No break at the end of case if "break" is defined in braces and in a macro [*] CaseBreakCheckerTest.java 1.7 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.6&r2=1.7