This is the mail archive of the gdb-patches@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]

[commit] Disable -Wformat un Windows


On 2008-01-25, Kai made bfd-in2.h use the Microsoft %I64 format
specifier.  No released version of GCC handles this correctly with
-Wformat; the upcoming GCC 4.4 will.

BFD shortly thereafter disabled -Wformat on Windows.  We have to do
the same, or else the build fails with any released MinGW compiler
and -Werror.  I've used the same condition as BFD.

Tested by building on i686-mingw32, and committed.

-- 
Daniel Jacobowitz
CodeSourcery

2008-06-09  Daniel Jacobowitz  <dan@codesourcery.com>

	* configure.ac (build_warnings): Add -Wno-format for mingw.
	* configure: Regenerated.

Index: gdb/configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.69
diff -u -p -r1.69 configure.ac
--- gdb/configure.ac	5 Jun 2008 22:36:56 -0000	1.69
+++ gdb/configure.ac	8 Jun 2008 18:37:18 -0000
@@ -1331,6 +1331,12 @@ build_warnings="-Wall -Wdeclaration-afte
 -Wformat-nonliteral -Wno-pointer-sign \
 -Wno-unused -Wno-switch -Wno-char-subscripts"
 
+# 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
+
 AC_ARG_ENABLE(build-warnings,
 [  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
 [case "${enableval}" in


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