From 4f5d6aa770e02c475ec1feac5c8cf46714ba7f28 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 7 Aug 2011 09:55:12 +0000 Subject: [PATCH] use -O1 when debugging, otherwise gcc ignores -Wuninitialized --- ChangeLog | 8 ++++++++ configure.ac | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2f0025edd..19f4315d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-08-07 Robert Larice + * configure.ac : + use -O1 when debugging, otherwise gcc ignores -Wuninitialized + this is temporary, and certainly will confuse users of gdb + obviously somewhere around gcc version 4.4 the necessity to have + enable optimization for detecting uninitialized variables was dropped. + stable Debian's gcc is a 4.4 and still needs -O1 ... + 2011-08-06 Dietmar Warning * bsim4v4/b4v4set.c: fix missing model parameter defaults * b4check.c, b4v4check.c, b4v5check.c: add "4.x" as a short form for version diff --git a/configure.ac b/configure.ac index b3f28d188..3361cfa35 100644 --- a/configure.ac +++ b/configure.ac @@ -211,7 +211,7 @@ if test "$enable_debug" = "no"; then else AC_DEFINE(NGDEBUG,1,[Compile with debug info]) if test "x$GCC" = "xyes"; then - CFLAGS="$ext_CFLAGS -g -O0 -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wold-style-definition -Wredundant-decls -Wconversion" + CFLAGS="$ext_CFLAGS -g -O1 -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wold-style-definition -Wredundant-decls -Wconversion" else CFLAGS="$ext_CFLAGS -g" fi