TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - C Coding Standard
Search

SR:  12.1#1Checked automatically with code checker

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] = "~~??";