| Summary: | [fp] No break at the end of case if "break" is defined in braces and in a macro | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Anton G. <xgsa> |
| Component: | cdt-codan | Assignee: | Elena Laskavaia <elaskavaia.cdt> |
| Status: | RESOLVED FIXED | QA Contact: | Elena Laskavaia <elaskavaia.cdt> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, malaperle, xgsa |
| Version: | 8.0 | ||
| Target Milestone: | 8.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
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 |
#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.