JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
A function-like macro is defined.
See also Macro Argument is both Mixed and Expanded.
| Class Name | Function-Like Macro | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Significance | style | ||||||||||||||||||||||||||||||
| Mnemonic | LANG.PREPROC.FUNCMACRO | ||||||||||||||||||||||||||||||
| Categories |
|
||||||||||||||||||||||||||||||
| Availability | Available for C and C++. |
||||||||||||||||||||||||||||||
| Enabling | Checks for this warning class are
disabled by default. To enable them, add the following WARNING_FILTER
rule to the project configuration file.
WARNING_FILTER += allow class="Function-Like Macro" |
#define ONE 1 /* not function-like */ #define TWO (2) /* not function-like */ #define THREE()(3) /* 'Function-Like Macro' warning issued here */ #define FOUR(a)(4) /* 'Function-Like Macro' warning issued here */ #define ADD(a,b)(a+b) /* 'Function-Like Macro' warning issued here */ /* Macros do not need to be used in order to trigger 'Function-Like Macro' warnings. */
The following configuration file parameters affect checks for this warning class.
To report problems with this documentation, please visit https://support.codesecure.com/.