diff --git a/acinclude.m4 b/acinclude.m4
index 8c5d8cc3fa3bd87568902c7609bdae0acffc02a6..3bfb11246f3d2bce3009f828e8c9847b690fa505 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -697,6 +697,11 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS],
            WARN="$WARN -Wendif-labels -Wstrict-prototypes"
          fi
 
+         if test "$gccnum" -ge "304"; then
+           # try -Wunreachable-code on gcc 3.4
+           WARN="$WARN -Wunreachable-code"
+         fi
+
          for flag in $CPPFLAGS; do
            case "$flag" in
             -I*)