[previous] 1045 [next] [E] Use of the #include_next preprocessing directive is a language extension.
Language extensions

The #include_next preprocessing directive is a language extension. It can be used to provide a stub for a Standard Library or a 3rd party header file. This allows parsing of the header file to be altered without having to modify the original file. However, this usage is not portable.

For example:


/*PRQA S 1-9999 ++*/
/*PRQA S 1045 --*/

//
// stddef.h
// a stub that overrides wchar_t definition in stddef.h

typedef unsigned char wchar_t;
#define _WCHAR_T

// include the original header
#include_next <stddef.h>


MISRA C:2012 Rules applicable to message 1045:

Rule-1.2  (Advisory) Language extensions should not be used


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