mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
Don't do clang version detection when disabling some flags
When clang 2.9 was around we hoped they'd introduce support for the normalized=id and override-init warnings by 3.0, but they haven't. We should only add the version detection back in when clang actually supports those warnings.
This commit is contained in:
parent
bec50680a3
commit
083296bc27
@ -680,11 +680,6 @@ if test x$enable_gcc_warnings = xyes && test "$GCC" = "yes"; then
|
|||||||
#error
|
#error
|
||||||
#endif])], have_clang=yes, have_clang=no)
|
#endif])], have_clang=yes, have_clang=no)
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
|
|
||||||
#if !defined(__clang__) || (__clang_major__ > 2) || (__clang_major__ == 2 && __clang_minor__ > 9)
|
|
||||||
#error
|
|
||||||
#endif])], have_clang29orlower=yes, have_clang29orlower=no)
|
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror"
|
CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror"
|
||||||
CFLAGS="$CFLAGS -Wno-unused-parameter -Wstrict-aliasing"
|
CFLAGS="$CFLAGS -Wno-unused-parameter -Wstrict-aliasing"
|
||||||
|
|
||||||
@ -699,10 +694,8 @@ if test x$enable_gcc_warnings = xyes && test "$GCC" = "yes"; then
|
|||||||
CFLAGS="$CFLAGS -Waddress"
|
CFLAGS="$CFLAGS -Waddress"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$have_gcc42 = xyes && test x$have_clang29orlower = xno; then
|
if test x$have_gcc42 = xyes && test x$have_clang = xno; then
|
||||||
# These warnings break gcc 4.0.2 and clang, but work on gcc 4.2
|
# These warnings break gcc 4.0.2 and clang, but work on gcc 4.2
|
||||||
# We only disable these for clang 2.9 and lower, in case they are
|
|
||||||
# supported in later versions.
|
|
||||||
CFLAGS="$CFLAGS -Wnormalized=id -Woverride-init"
|
CFLAGS="$CFLAGS -Wnormalized=id -Woverride-init"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user