28-01-2014, 05:54 PM
Does the following example violate rule #2.4:
Code:
typedef enum A {
b
} A;
A c() {
return b;
}
Welcome to the new MISRA discussion forum, if you were previously a member of our forums you may need to reset your password.
2.4 violation?
|
28-01-2014, 05:54 PM
Does the following example violate rule #2.4:
Code: typedef enum A {
10-02-2014, 02:09 PM
Your example does violate rule 2.4, providing typedef “A†is always used in the rest of the translation unit and never “enum Aâ€. A compliant typedef declaration could be written as
Code: typedef enum {
Posted by and on behalf of the MISRA C Working Group
|
« Next Oldest | Next Newest »
|