/* >>>------------------------------------------------------------ * * File: rule_1.1.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 1.1 (Required): * All code shall conform to ISO 9899:1990 C programming language, * ISO 9899, amended and corrected by ISO/IEC 9899/COR1:1995, ISO/IEC * 9899/AMD1:1995, and ISO/IEC 9899/COR2: 1996 * * Implemented by messages: * 180 [E] Use of ll for conversion specifier %s is a language * extension. * * 240 [E] This file contains the control-M character at the * end of a line. * * 241 [E] This file contains the control-Z character - was * this transferred from a PC? * * 246 [E] Binary integer constants are a language extension. * * 410 [L] Nesting of parentheses exceeds 32 - program is * non-conforming. * * 551 [E] Cast may not operate on the left operand of the * assignment operator. * * 601 [E] 'main()' should have either type 'int (void)' or * 'int (int, char *[])'. * * 609 [L] Number of modifiers in declarator exceeds 12 - * program is non-conforming. * * 611 [L] Nesting of 'struct' or 'union' types exceeds 15 - * program is non-conforming. * * 612 [L] Size of object '%s' exceeds 32767 bytes - program is * non-conforming. * * 614 [L] Number of block scope identifiers exceeds 127 in a * block - program is non-conforming. * * 639 [L] Number of members in 'struct' or 'union' exceeds 127 * - program is non-conforming. * * 647 [L] Number of enumeration constants exceeds 127 - * program is non-conforming. * * 662 [E] Accessing a member of a nested structure in this way * is a language extension. * * 715 [L] Nesting of control structures (statements) exceeds * 15 - program is non-conforming. * * 739 [L] Number of 'case' labels exceeds 257 - program is * non-conforming. * * 810 [L] '#include "%s"' causes nesting to exceed 8 levels - * program is non-conforming. * * 828 [L] Maximum '#if...' nesting exceeds 8 levels - program * is non-conforming. * * 830 [E] Preprocessor directive may be followed by whitespace * and new-line only. Comments may be used to add extra * text to preprocessor directives. * * 831 [E] Use of '\\' in this '#include' line is a PC * extension - '/' has been assumed. This usage is * non-portable. * * 857 [L] Number of macro definitions exceeds 1024 - program * is non-conforming. * * 858 [L] Number of macro parameters exceeds 31 - program is * non-conforming. * * 859 [L] Number of arguments in macro call exceeds 31 - * program is non-conforming. * * 875 [L] String literal exceeds 509 characters - program is * non-conforming. * * 930 [E] Comma ',' is not valid at the end of an * enumerator-list. * * 1003 [E] '#%s' is a language extension for in-line assembler. * * 1006 [E] This assembler construct has been ignored. * * 1008 [E] '#%s' is not a legal ISO C preprocessor directive. * * 1014 [E] Unusual type specification - this will be treated as * a language extension. * * 1015 [E] '%s' is not a legal keyword in ISO C. * * 1018 [E] The LL suffix is a language extension. * * 1019 [E] '@ address' is not supported in ISO C. * * 1020 [E] '__typeof__' is not a valid ISO C token, and is * treated as an extension. * * 1021 [E] Statement in expression is not valid ISO, treated as * an extension. * * 1022 [E] '__alignof__' is not a valid ISO C token, and is * treated as an extension. * * 1026 [E] The indicated @word construct has been ignored. * * 1027 [E] long long is a language extension. * * 1028 [E] Use of the sizeof operator in a preprocessor * statement is a language extension. * * 1029 [E] Whitespace encountered between backslash and * new-line has been ignored. * * 3664 [E] Using a dot operator to access an individual bit is * a language extension. * * <<<------------------------------------------------------------ */ #include #include "misra.h" #include "gen.h" void put_line( const PC *str ) { ( void )printf( "%s\n", str ); }