Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333176 - Add an option to disable warnings/errors from macro expansions
Summary: Add an option to disable warnings/errors from macro expansions
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 7.0.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 8.0.1   Edit
Assignee: Sergey Prigogin CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-23 18:47 EST by Sergey Prigogin CLA
Modified: 2011-08-29 20:16 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.