Synopsis: | String literals must have a formally defined value. |
Language: | C |
Severity Level: | 2 |
Category: | LEXICAL CONVENTIONS |
Description: |
String literals must be correctly terminated by a null or ". It is possible using the # operator in the pre-processor to construct a macro which can expand to an undefined string in some circumstances.
Example: In this example, the string is not terminated correctly and hence the result is undefined.#define str(x) #x char fred[]=str(fred\\\\\\\\\\\\\\\\); |