From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: mark.kettenis@xs4all.nl, gdb-patches@sourceware.org
Subject: Re: RFC: Warning fixes
Date: Wed, 03 Jan 2007 18:47:00 -0000 [thread overview]
Message-ID: <20070103184712.GF17935@nevyn.them.org> (raw)
In-Reply-To: <uy7oq3nlm.fsf@gnu.org>
On Fri, Dec 29, 2006 at 02:15:01PM +0200, Eli Zaretskii wrote:
> > Date: Thu, 28 Dec 2006 18:09:26 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: gdb-patches@sourceware.org
> >
> > The warning is a bit annoying, though. We can't portably tell whether
> > the type of sig will be signed or unsigned. Perhaps we should force
> > sig to be an int before bounds checking, instead, and I should file a
> > GCC bug report. How's that sound to you?
>
> A GCC bug report is in order, I agree: the compiler shouldn't punish
> the programmer for its choice of data type.
I filed the moral equivalent of a bug report by asking Joseph (C front
end maintainer) about this. His reply was:
> This sort of thing is why such warnings belong in -Wextra not -Wall.
> (And not on unconditionally, as some such warnings are.)
So the warning is performing quirkily as designed, and we have a choice
whether to adapt our code to GCC's periodic quirks to use -Wextra, or
to avoid -Wextra. We decided, in the thread following my other patch,
to avoid it.
I'm going to check in the fix for this one anyway, since it's just a
single cast, in case someone wants to survey the results with -Wextra
for another target later. I'm sure it will have plenty to complain
about.
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2007-01-03 18:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-28 19:58 Daniel Jacobowitz
2006-12-28 22:56 ` Mark Kettenis
2006-12-28 23:08 ` Andreas Schwab
2006-12-28 23:09 ` Daniel Jacobowitz
2006-12-29 3:48 ` Daniel Jacobowitz
2007-01-03 19:01 ` Daniel Jacobowitz
2006-12-29 12:15 ` Eli Zaretskii
2007-01-03 18:47 ` Daniel Jacobowitz [this message]
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=20070103184712.GF17935@nevyn.them.org \
--to=drow@false.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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