![]() |
![]() |
0880 | ![]() |
||||
![]() | |||||||
| Macro Definition | REFERENCE - ISO:C90-6.8.3.2 The # Operator - Semantics | ||||||
# and ## operators are both present in this macro definition The order in which # and ## operators are evaluated during preprocessing is unspecified. In most situations this will be irrelevant, but it may be wise to avoid using more than one of these operators within the same macro because a macro which works with one compiler may fail with another. In the following example, the macro MAKE_WSL has been written with the intention of performing 2 operations:
/*PRQA S 878,2017,3211,3408,3410,3429,3453,3602 ++*/
#include <stddef.h>
#define MAKE_WSL(X) L ## #X /* Message 0880 */
const wchar_t * pws = MAKE_WSL(abc); /* L"abc" or ??? */
MISRA-C:2004 Rules applicable to message 0880:
| Rule 19.12 (Required) | There shall be at most one occurrence of the # or ## preprocessor operators in a single macro definition. |
See also:
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |