![]() |
![]() |
1271 | ![]() |
||||
![]() | |||||||
| Enumerations | REFERENCE - ISO:C90-6.5.2.2 Enumeration Specifiers | ||||||
The expression which defines this enumeration constant is not of type int. The type of an enum constant is always int and the value of the expression used to define it must be representable in an int. The type of the expression is allowed to be of some other integer type but this will not affect the type of the constant. For example:
/*PRQA S 553,1018,1259,1278,2017,2213,3602 ++*/
enum E1 { X1 = 3L }; /* Message 1271 */
enum E2 { X2 = 3UL}; /* Message 1271 */
enum E3 { X3 = 3LL}; /* Message 1271 */
enum E4 { X4 = (short)3 }; /* Message 1271 */
enum E5 { X5 = (signed char)3 }; /* Message 1271 */
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |