[previous] 3438 [next] [U] #undef'ing the assert macro to call a function of that name causes undefined behaviour.
Explicitly undefined REFERENCE - ISO:C90-7.2 Diagnostics <assert.h>

If the 'assert' macro is suppressed in order to call a function of that name, the result will be undefined.

For example:


/*PRQA S 841,2017,3408,3447 ++*/

#undef assert                           /* Message 3438 */

extern void assert(void);

extern void foo(void)
{
   assert();                            /* Message 3437 */
}


MISRA C:2012 Rules applicable to message 3438:

Rule-1.3  (Required) There shall be no occurrence of undefined or critical unspecified behaviour


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