[previous] 0041 [next] [Q] Definition of ptrdiff_t differs from configured type.
QAC configuration

ptrdiff_t is defined by a typedef in the standard library header file <stddef.h>.

QA C has an option (-intrinsictype, compiler personality), which allows the type associated with a pointer subtraction operation to be defined. Message 0041 is generated if a typedef encountered in the source code is not consistent with this configured type.

The QA C Standard Library header files use an implicit macro, PRQA_PTRDIFF_T, when declaring the type of ptrdiff_t. This macro is automatically defined in the QA C environment to reflect the configuration option setting. If you are using your own header files to define ptrdiff_t, you should ensure that QA C is configured to be consistent with this typedef.


No MISRA C:2012 Rules applicable to message 0041


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