06-09-2010, 09:34 AM
Neither of the examples given is permitted by Rule 6.2..
Here are some more examples:
Here are some more examples:
Code:
signed char a[10] = "123456789"; /* Non-compliant Rule 6.2 */
char a[10] = "123456789"; /* Compliant Rule 6.2 */
char x[4] = {1, 2, 3, 4}; /* Non-compliant Rules 6.2 and 6.3 */
Posted by and on behalf of the MISRA C Working Group