![]() |
|
MISRA-C:2004 Rule 12.9: (Required) |
|
||||
![]() | |||||||
See section 6.10 for a description of underlying type.
Example Code:
/* PRQA S 3199,3203 ++ */
#include "misra.h"
#include "m2cmex.h"
extern S16 test_1209( void )
{
u32r = -u32a; /* MISRA Violation */
s16a = -u8a; /* MISRA Violation */
return 1;
}
QAC messages that encompass this guideline:
| 3101 | Unary '-' applied to an operand of type unsigned int or unsigned long gives an unsigned result. |
| 3102 | Unary '-' applied to an operand whose underlying type is unsigned. |
|
||
(c) The Motor Industry Research Association, 2004
|
QA C Source Code Analyser 8.1.2
MISRA-C:2004 Compliance Module 3.2 © 2013 Programming Research www.programmingresearch.com |
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |