MISRA.CHAR.TRIGRAPHTrigraph usage. MISRA C 2012 Rule 4.2: Trigraphs should not be usedCategory: Advisory Analysis: Decidable, Single Translation Unit Applies to: C90, C99 RationaleTrigraphs are denoted by a sequence of two question marks followed by a specified third character (e.g. ??- represents a ~ (tilde) character and ??) represents a ] ). They can cause accidental confusion with other uses of two question marks. Note: the so-called digraphs: <: :> <% %> %: %:%: are permitted because they are tokens. Trigraphs are replaced wherever they appear in the program prior to preprocessing. ExampleFor example the string "(Date should be in the form ??-??-??)" would not behave as expected, actually being interpreted by the compiler as "(Date should be in the form ~~]" MISRA-C 2004 Rule 4.2 (required): Trigraphs shall not be used.Trigraphs are denoted by a sequence of 2 question marks followed by a specified third character (e.g. ??- represents a "~" (tilde) character and ??) represents a "]"). They can cause accidental confusion with other uses of two question marks. For example the string "(Date should be in the form ??-??-??)" would not behave as expected, actually being interpreted by the compiler as "(Date should be in the form ~~]" MISRA-C++ 2008 Rule 2-3-1 (required): Trigraphs shall not be used.RationaleTrigraphs are denoted by a sequence of 2 question marks followed by a specified third character (e.g. ??- represents a "~" (tilde) character and ??) represents a "]"). They can cause accidental confusion with other uses of two question marks. ExampleThe string "(Date should be in the form ??-??-??)" would probably not meet developer expectations, since the compiler would interpret it as "(Date should be in the form ~~]" |