This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/28912] Non-functional -funsigned-char: signed/unsigned mismatch is reported
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2006 11:37:18 -0000
- Subject: [Bug c/28912] Non-functional -funsigned-char: signed/unsigned mismatch is reported
- References: <bug-28912-13179@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from joseph at codesourcery dot com 2006-09-26 11:37 -------
Subject: Re: Non-functional -funsigned-char: signed/unsigned
mismatch is reported
On Mon, 25 Sep 2006, pinskia at gcc dot gnu dot org wrote:
> C++ in a way is clearer here that char, signed char, and unsigned char are
> three distant types but C90 and C99 do say that but is not clear about it.
I'd say C90 (6.1.2.5) "Even if the implementation defines two or more
basic types to have the same representation, they are nevertheless
different types." is perfectly clear. In C99 the footnote
35)CHAR_MIN, defined in <limits.h>, will have one of the
values 0 or SCHAR_MIN, and this can be used to
distinguish the two options. Irrespective of the choice
made, char is a separate type from the other two and is
not compatible with either.
is added.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28912