Synopsis: | Trigraphs shall not be used. |
Language: | C |
Severity Level: | 3 |
Category: | PREPROCESSING |
Description: |
Trigraphs quite apart from their non-portability to pre-ANSI environments, look very confusing. Avoiding adjacent question marks eliminates any possible confusion with trigraphs. Note in particular the, once common, practice of using ? as a place holder in a string is very dangerous.
Example: char date[20] = "??-??-??"; /* This is actually replaced with: */ char date[20] = "~~??"; |