From: Andreas Schwab <schwab@suse.de>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: drow@false.org, gdb-patches@sourceware.org
Subject: Re: RFC: Warning fixes
Date: Thu, 28 Dec 2006 23:08:00 -0000 [thread overview]
Message-ID: <jehcvfaaaz.fsf@sykes.suse.de> (raw)
In-Reply-To: <200612282256.kBSMu65R022410@brahms.sibelius.xs4all.nl> (Mark Kettenis's message of "Thu, 28 Dec 2006 23:56:06 +0100 (CET)")
Mark Kettenis <mark.kettenis@xs4all.nl> writes:
> ISO C clearly states that enumeration constants have type 'int', so
> sig could be negative, and we defenitely want to catch that case. If
> GCC thinks it knows that (sig >= TARGET_SIGNAL_FIRST), I think it is
> being too smart for its own good.
The compiler can chose any signed or unsigned type for the enumeration
_type_ to be compatible with, provided that the type can represent all
members of it. So it is perfectly valid for the compiler to chose an
unsigned type for an emumeration that only consists of non-negative
values. This is independent of the type of the enum constants itself.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2006-12-28 23:08 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 [this message]
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
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=jehcvfaaaz.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=drow@false.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