]> granicus.if.org Git - strace/commit
xlat: check that system definitions match fallback definitions
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 29 Apr 2018 21:59:55 +0000 (21:59 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 29 Apr 2018 21:59:55 +0000 (21:59 +0000)
commitf12aa97aab4336e2203cebcdf1b1b3004be758f3
tree9d6a970469749dbbdcda3f7b8aff9a43b7e3c4f2
parente36c1a7476bd86c057bfb756e4ebeaf21e2b0d01
xlat: check that system definitions match fallback definitions

For each constant that is accompanied by a fallback definition,
generate a sanity check that the definition provided by system headers
matches the fallback definition.

* gcc_compat.h (DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE,
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE): New macros.
* xlat/gen.sh (cond_def): Generate a code that checks the system
definition against the default.
(gen_header): Generate a code that includes "gcc_compat.h" and
"static_assert.h".

Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
gcc_compat.h
xlat/gen.sh