Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333176

Summary: Add an option to disable warnings/errors from macro expansions
Product: [Tools] CDT Reporter: Sergey Prigogin <eclipse.sprigogin>
Component: cdt-codanAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug, yevshif
Version: 7.0.1   
Target Milestone: 8.0.1   
Hardware: PC   
OS: All   
Whiteboard:

Description Sergey Prigogin CLA 2010-12-23 18:47:50 EST
Currently, if a code fragment defined as a macro triggers a Codan warning, all occurrences of the macro in code will be marked as warnings. This pretty annoying, especially because the cause of the warning is not clear to the user until she expands the macro. Codan should provide an option to disable errors and warnings in macro expansions except for the problems that correspond to compiler errors.
Comment 1 Elena Laskavaia CLA 2010-12-24 10:07:33 EST
Which error? Some errors has this option.
Comment 2 Sergey Prigogin CLA 2010-12-29 13:52:52 EST
(In reply to comment #1)
> Which error? Some errors has this option.

No break at end of case.
Comment 3 Sergey Prigogin CLA 2011-08-29 20:16:57 EDT
"No break at end of case" has been changed to not produce a warning if the 'case' statement was produced by macro expansion. This is done unconditionally, without an option.

I've added "Report problem in statements that come from macro expansion" option to "Unused declaration of variable/function" checker.