public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tromey at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug build/15414] Build fails with mingw32-w64 GCC-4.8.0
Date: Mon, 29 Apr 2013 17:05:00 -0000	[thread overview]
Message-ID: <bug-15414-4717-dM21WXTy7U@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15414-4717@http.sourceware.org/bugzilla/>

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.


  parent reply	other threads:[~2013-04-29 17:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-28 21:45 [Bug build/15414] New: " freddie_chopin at op dot pl
2013-04-29 13:46 ` [Bug build/15414] " tromey at redhat dot com
2013-04-29 14:45 ` freddie_chopin at op dot pl
2013-04-29 17:05 ` tromey at redhat dot com [this message]
2013-04-29 17:30 ` freddie_chopin at op dot pl
2013-04-29 18:15 ` freddie_chopin at op dot pl
2013-05-02 17:19 ` freddie_chopin at op dot pl
2013-05-07 20:10 ` tromey at redhat dot com
2013-05-10 16:10 ` cvs-commit at gcc dot gnu.org
2013-05-10 16:13 ` tromey at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15414-4717-dM21WXTy7U@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).