typedef double float64_t; /* ----------------- Example code from MISRA C:2012 begin ----------------- */ #include /* Non-compliant */ extern void *memcpy ( void *restrict s1, const void *restrict s2, size_t n ); /* Non-compliant */ #define _BUILTIN_sqrt( x ) ( x ) #include /* ------------------ Example code from MISRA C:2012 end ------------------ */ void callSqrt ( void ) { /* ----------------- Example code from MISRA C:2012 begin ----------------- */ /* sqrt may not behave as defined in the Standard */ float64_t x = sqrt ( ( float64_t ) 2.0 ); /* ------------------ Example code from MISRA C:2012 end ------------------ */ }