gem5/util/style
Andreas Sandberg 653b4657e6 style: Force Python.h to be included before main header
Python's header files set various compiler macros (e.g.,
_XOPEN_SOURCE) unconditionally. This triggers preprocessor warnings
that end up being treated as errors. The Python integration manual [1]
strongly recommends that Python.h is included before any system
header. The style guide used to mandate that Python.h is included
first in any file that needs it. This requirement was changed to
always include a source file's main header first, which ended up
triggering these errors.

This change updates the style checker to always include Python.h
before the main header file.

[1] https://docs.python.org/2/extending/extending.html

Change-Id: Id6a4f7fc64a336a8fd26691a0ca682abeb1d1579
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>
2017-02-07 15:28:33 +00:00
..
__init__.py style: Refactor the style checker as a Python package 2016-03-30 15:30:32 +01:00
file_types.py style: catch trailing white spaces in make and dts files 2016-06-20 14:49:52 +01:00
region.py style: Refactor the style checker as a Python package 2016-03-30 15:30:32 +01:00
repo.py style: improve compatibility with old git versions 2016-04-28 15:17:50 +01:00
sort_includes.py style: Force Python.h to be included before main header 2017-02-07 15:28:33 +00:00
style.py style: ignore test data in style checks 2016-04-28 15:19:58 +01:00
verifiers.py util: git pre-commit hook to check staged files 2016-11-25 10:31:21 +00:00