This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug build/15414] Build fails with mingw32-w64 GCC-4.8.0


http://sourceware.org/bugzilla/show_bug.cgi?id=15414

--- Comment #3 from Tom Tromey <tromey at redhat dot com> 2013-04-29 17:05:34 UTC ---
Ok, I see.  Sorry about that, I misunderstood.

I think the logic in configure.ac for setting this up is not
correct:

build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wformat-nonliteral -Wpointer-sign \
-Wno-unused -Wunused-value -Wunused-function \
-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
-Wdeclaration-after-statement -Wempty-body"

# Enable -Wno-format by default when using gcc on mingw since many
# GCC versions complain about %I64.
case "${host}" in
  *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
esac


It seems to me it would be better to try -Wformat only on other
systems like:

diff --git a/gdb/configure.ac b/gdb/configure.ac
index bb7fbdd..7c2080c 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1926,7 +1926,7 @@ fi
 # NOTE: If you change this list, remember to update
 # gdb/doc/gdbint.texinfo.
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
--Wformat-nonliteral -Wpointer-sign \
+-Wpointer-sign \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
 -Wdeclaration-after-statement -Wempty-body"
@@ -1935,6 +1935,7 @@ build_warnings="-Wall -Wdeclaration-after-statement
-Wpointer-arith \
 # GCC versions complain about %I64.
 case "${host}" in
   *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
+  *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
 esac

 AC_ARG_ENABLE(build-warnings,


Could you give that a try?
You should be able to apply this patch directly to configure if you
can't re-run autoconf.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]