Synopsis: | The line splicing character ('\' at the end of a line) shall not be used, except in preprocessor macros. |
Language: | C |
Severity Level: | 8 |
Category: | Preprocessing Directives |
Description: |
Justification This construct does not enhance readability in for example string literals. It also prohibits indentation in string literals. Example 1 const char message[] = "This is a string on more than \ one line.\n"; /* WRONG */ const char message[] = "This is a string on more than " "one line.\n"; /* RIGHT */ Example 2 #define VERY_LONG_MACRO_NAME \ (...) /* RIGHT */ |