System headers vs MISRA

Technical Note 160905

Targets:
all

Component:
Compiler

Updated:
10/17/2016 10:53 AM

Introduction

Running MISRA checks on a system header file might result in a warning for one or more MISRA rule violations.

Discussion

System header files are not required to comply with MISRA rules (see, for example, MISRA C-2012, section 6.7).

The suggested solution is not to run MISRA checks on system header files.

IAR MISRA checkers

By design and default, IAR MISRA checkers do not check system header files for MISRA rule violations.

Please contact IAR support if you find otherwise.

Conclusion

If possible, avoid running MISRA checks on system header files.

 

All product names are trademarks or registered trademarks of their respective owners.

© IAR Systems 1995-2016 - All rights reserved.