![]() |
![]() |
0543 | ![]() |
||||
![]() | |||||||
| Explicitly undefined | REFERENCE - ISO:C90-6.2.2.2 void | ||||||
An attempt has been made to used the value of an expression which is of type void. This is meaningless and the result will be undefined. In practice, any attempt to use the value of a void expression is likely to result in other messages. For example, in the code below, message 0481 (a constraint error) is also generated.
/*PRQA S 2017,3199,3203,3408,3447 ++*/
extern void func(void);
extern void foo(void)
{
int r;
r = (int)func(); /* Message 0543 - and also 0481 */
}
MISRA-C:2004 Rules applicable to message 0543:
| Rule 1.2 (Required) | No reliance shall be placed on undefined or unspecified behaviour. |
See also:
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |