mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-24 08:03:32 +03:00
Enable -Wundef, when supported.
This can catch bugs in which one header defines a numeric constant, and another uses it without including the defining header. Undefined preprocessor symbols expand to '0', so that this will compile fine, silently doing the math wrong.
This commit is contained in:
parent
3823effe12
commit
425253e2cd
5 changed files with 12 additions and 13 deletions
|
|
@ -241,6 +241,7 @@ if test "x$GCC" = "xyes" ; then
|
|||
JE_CFLAGS_ADD([-Wall])
|
||||
JE_CFLAGS_ADD([-Wshorten-64-to-32])
|
||||
JE_CFLAGS_ADD([-Wsign-compare])
|
||||
JE_CFLAGS_ADD([-Wundef])
|
||||
JE_CFLAGS_ADD([-pipe])
|
||||
JE_CFLAGS_ADD([-g3])
|
||||
elif test "x$je_cv_msvc" = "xyes" ; then
|
||||
|
|
@ -824,7 +825,9 @@ else
|
|||
JEMALLOC_PREFIX="je_"
|
||||
fi]
|
||||
)
|
||||
if test "x$JEMALLOC_PREFIX" != "x" ; then
|
||||
if test "x$JEMALLOC_PREFIX" = "x" ; then
|
||||
AC_DEFINE([JEMALLOC_IS_MALLOC])
|
||||
else
|
||||
JEMALLOC_CPREFIX=`echo ${JEMALLOC_PREFIX} | tr "a-z" "A-Z"`
|
||||
AC_DEFINE_UNQUOTED([JEMALLOC_PREFIX], ["$JEMALLOC_PREFIX"])
|
||||
AC_DEFINE_UNQUOTED([JEMALLOC_CPREFIX], ["$JEMALLOC_CPREFIX"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue