[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r14149: Make --enable-gcc-warnings work under the recently released (tor/trunk)
Author: nickm
Date: 2008-03-21 15:18:54 -0400 (Fri, 21 Mar 2008)
New Revision: 14149
Modified:
tor/trunk/
tor/trunk/ChangeLog
tor/trunk/configure.in
Log:
r19003@catbus: nickm | 2008-03-21 15:13:57 -0400
Make --enable-gcc-warnings work under the recently released GCC 4.3.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r19003] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2008-03-21 13:42:06 UTC (rev 14148)
+++ tor/trunk/ChangeLog 2008-03-21 19:18:54 UTC (rev 14149)
@@ -21,6 +21,9 @@
to avoid unused RAM in buffer chunks and memory pools.
- Downgrade "sslv3 alert handshake failure" message to INFO.
- Only log guard node status when guard node status has changed.
+ - Add a couple of extra warnings to --enable-gcc-warnings for GCC 4.3,
+ and stop using a warning that had become unfixably verbose under GCC
+ 4.3.
o Code simplifications and refactoring:
- Refactor code using connection_ap_handshake_attach_circuit() to
Modified: tor/trunk/configure.in
===================================================================
--- tor/trunk/configure.in 2008-03-21 13:42:06 UTC (rev 14148)
+++ tor/trunk/configure.in 2008-03-21 19:18:54 UTC (rev 14149)
@@ -723,6 +723,11 @@
#error
#endif]), have_gcc42=yes, have_gcc42=no)
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [
+#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+#error
+#endif]), have_gcc43=yes, have_gcc43=no)
+
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wshorten-64-to-32"
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], []), have_shorten64_flag=yes,
@@ -730,6 +735,7 @@
CFLAGS="$save_CFLAGS"
CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror"
+
# Disabled, so we can use mallinfo(): -Waggregate-return
if test x$have_gcc4 = xyes ; then
@@ -741,9 +747,16 @@
# These warnings break gcc 4.0.2 and work on gcc 4.2
# XXXX020 Use -fstack-protector.
# XXXX020 See if any of these work with earlier versions.
- CFLAGS="$CFLAGS -Waddress -Wmissing-noreturn -Wnormalized=id -Woverride-init -Wstrict-overflow=5"
+ CFLAGS="$CFLAGS -Waddress -Wmissing-noreturn -Wnormalized=id -Woverride-init -Wstrict-overflow=1"
+ # We used to use -Wstrict-overflow=5, but that breaks us heavily under 4.3.
fi
+ if test x$have_gcc43 = xyes ; then
+ # These warnings break gcc 4.2 and work on gcc 4.3
+ # XXXX020 See if any of these work with earlier versions.
+ CFLAGS="$CFLAGS -Wextra -Warray-bounds"
+ fi
+
if test x$have_shorten64_flag = xyes ; then
CFLAGS="$CFLAGS -Wshorten-64-to-32"
fi