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

Rule:  6.4.4.4.aChecked automatically with code checker

Synopsis:Only ANSI defined escape sequences shall be used.
Language:C
Severity Level:2
Category:Lexical Elements


Description:

Justification

Escape sequences (those beginning with \) other than those defined by the ANSI standard have undefined behavior, impacting both reliability and portability.

Example

char a   = '\x'; /* WRONG */
char b   = '\xfff'; /* WRONG */
char c   = '\777'; /* WRONG */
char d[] = "\x"; /* WRONG */
char e[] = "\y"; /* WRONG */
char f   = '\x; /* WRONG */
char g   = '\8'; /* WRONG */
char h   = '\n'; /* RIGHT */