This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C PATCH to rectify warning for character types (PR c/23087)
- From: Marek Polacek <polacek at redhat dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 8 Jan 2016 19:07:04 +0100
- Subject: Re: C PATCH to rectify warning for character types (PR c/23087)
- Authentication-results: sourceware.org; auth=none
- References: <20160107171127 dot GK31604 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1601072117140 dot 31194 at digraph dot polyomino dot org dot uk> <568FF7D8 dot 60004 at redhat dot com>
On Fri, Jan 08, 2016 at 06:54:32PM +0100, Bernd Schmidt wrote:
> On 01/07/2016 10:19 PM, Joseph Myers wrote:
>
> >I don't think it's desirable to raise the warning for this case under
> >different conditions from the warning for other signedness cases. The
> >targets do differ in signedness - it's just that the difference is between
> >"plain" and "signed" or "plain" and "unsigned", not between signed and
> >unsigned. Maybe the warning message should be more specific in this case,
> >but not a less-specific "incompatible" which is what this patch would
> >achieve.
>
> I was going to voice the same opinion yesterday but forgot to hit Send. If
> you consider signedness of char a tri-state, then there's nothing wrong with
> the warning message.
Well, it's been discussed at length in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087
It seems sort of weird to me to say that 'char' and 'signed char' do differ in
signedness when I know that my machine uses signed chars by default. But I'm
wary of raising the warning -- it's likely to cause more uproar. At this point
I don't know if I actually want to pursue this further, likely not. Yet I'd
like to resolve this very old PR one way or another.
Marek