![]() |
![]() |
2860 | ![]() |
||||
![]() | |||||||
| Shift operations | |||||||
The value of a constant expression of signed type is being shifted left. The resulting value will be implementation-defined because, either
/*PRQA S 271,1277,1279,2017,2982,2983,2984,2986,3120,3198,3199,3203,3408 ++*/
#define LVAL 0x1FFFFFFFL
extern void foo(void)
{
long sl;
sl = LVAL << 1; /* */
sl = LVAL << 2; /* */
sl = LVAL << 3; /* 2860 */
sl = LVAL << 4; /* 2860 */
}
MISRA C:2012 Rules applicable to message 2860:
| Dir-1.1 (Required) | Any implementation-defined behaviour on which the output of the program depends shall be documented and understood |
See also:
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index | Contents |