[previous] MISRA C:2012  Rule-4.2:  (Advisory) [next] Trigraphs should not be used

Example Code:


#pragma PRQA_MESSAGES_OFF 2982,2983

#include "misra.h"
#include "m3cmex.h"


extern int16_t rule_0402( void )
{
   const char *pa =    { "??=" };                                  /* 3601      */
   const char *pb =    { "??(" };                                  /* 3601      */
   const char *pc =    { "??/a" };                                 /* 3601      */
   const char *pd =    { "??/??/a" };                              /* 3601 3601 */
   const char *pe =    { "??)" };                                  /* 3601      */
   const char *pf =    { "??'" };                                  /* 3601      */
   const char *pg =    { "??<" };                                  /* 3601      */
   const char *ph =    { "??!" };                                  /* 3601      */
   const char *pi =    { "??>" };                                  /* 3601      */
   const char *pj =    { "??-" };                                  /* 3601      */
   const char *pk =    { "Date should be in the form ??-??-??" };  /* 3601 3601 */

   return 1;
}


QAC messages that encompass this guideline:

3601 Trigraphs (??x) are an ISO feature.



(c) The Motor Industry Research Association, 2012
QA C Source Code Analyser 8.1.2
MISRA C:2012 Compliance Module 1.0
© 2013 Programming Research
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents