[Bug c/23087] Misleading warning, "... differ in signedness" with the character types

2023-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087 Andrew Pinski changed: What|Removed |Added Status|REOPENED|NEW Summary|Misleading warnin

[Bug c/23087] Misleading warning, "... differ in signedness"

2023-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087 Andrew Pinski changed: What|Removed |Added CC||ideasman42 at gmail dot com --- Comment

[Bug c/23087] Misleading warning, "... differ in signedness"

2018-04-27 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087 Eric Gallager changed: What|Removed |Added Keywords||diagnostic, documentation --- Comment #1

[Bug c/23087] Misleading warning, "... differ in signedness"

2018-01-27 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Comment

[Bug c/23087] Misleading warning, "... differ in signedness"

2016-01-11 Thread Keith.S.Thompson at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087 --- Comment #17 from Keith Thompson --- I just took a quick look at the discussion on the gcc-patches mailing list. It's true that the standard doesn't classify plain "char" either as a signed integer type or as an unsigned integer type. But I

[Bug c/23087] Misleading warning, "... differ in signedness"

2016-01-11 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087 --- Comment #16 from joseph at codesourcery dot com --- Well, an additional note: 'char' and 'signed char' are different types (or similar in the unsigned case) could be added in the case where the types have the same representation, one is ch

[Bug c/23087] Misleading warning, "... differ in signedness"

2016-01-09 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087 Bernd Schmidt changed: What|Removed |Added CC||bernds at gcc dot gnu.org,

[Bug c/23087] Misleading warning, "... differ in signedness"

2016-01-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c/23087] Misleading warning, "... differ in signedness"

2016-01-05 Thread Keith.S.Thompson at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087 Keith Thompson changed: What|Removed |Added Version|4.0.0 |5.3.0 --- Comment #13 from Keith Thomps

[Bug c/23087] Misleading warning, "... differ in signedness"

2014-02-16 Thread jackie.rosen at hushmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087 Jackie Rosen changed: What|Removed |Added CC||jackie.rosen at hushmail dot com --- Comm

[Bug c/23087] Misleading warning, "... differ in signedness"

2008-03-31 Thread manu at gcc dot gnu dot org
--- Comment #11 from manu at gcc dot gnu dot org 2008-03-31 11:03 --- Actually as a user I would find clearer a warning such: warning: initialization of 'signed char *' from incompatible pointer type 'char *' so CONFIRMED. -- manu at gcc dot gnu dot org changed: What

[Bug c/23087] Misleading warning, "... differ in signedness"

2008-03-30 Thread kst at mib dot org
--- Comment #10 from kst at mib dot org 2008-03-30 21:49 --- (In reply to comment #9) > >I'd expect the warning to be muted in one of the calls, depending on > -f{un}signed-char. > > No, char is a seperate type from signed char and unsigned char so they are > always incompatiable when it

[Bug c/23087] Misleading warning, "... differ in signedness"

2008-03-30 Thread pinskia at gcc dot gnu dot org
--- Comment #9 from pinskia at gcc dot gnu dot org 2008-03-30 20:42 --- >I'd expect the warning to be muted in one of the calls, depending on -f{un}signed-char. No, char is a seperate type from signed char and unsigned char so they are always incompatiable when it comes to pointers to t

[Bug c/23087] Misleading warning, "... differ in signedness"

2006-01-16 Thread axel at zankasoftware dot com
--- Comment #8 from axel at zankasoftware dot com 2006-01-16 17:14 --- There's also the following issue, which seem related. $ cat test.c void nil_uch(unsigned char *uch) { *uch = 0; } void nil_sch(signed char *sch) { *sch = 0; } int main(void) { char ch = 0; nil_uch(

[Bug c/23087] Misleading warning, "... differ in signedness"

2005-10-09 Thread ebotcazou at gcc dot gnu dot org
--- Comment #7 from ebotcazou at gcc dot gnu dot org 2005-10-09 17:47 --- But it's platform-independent. -- ebotcazou at gcc dot gnu dot org changed: What|Removed |Added

[Bug c/23087] Misleading warning, "... differ in signedness"

2005-08-01 Thread christian dot joensson at gmail dot com
-- What|Removed |Added CC||christian dot joensson at ||gmail dot com http://gcc.gnu.org/bu

[Bug c/23087] Misleading warning, "... differ in signedness"

2005-07-27 Thread kst at mib dot org
--- Additional Comments From kst at mib dot org 2005-07-27 19:34 --- I misused the term "compatible" above (and I think the standard itself is sometimes a bit loose about the term). All references are to the C99 standard. I think the C90 rules are the same or very similar. 6.7.8p11:

[Bug c/23087] Misleading warning, "... differ in signedness"

2005-07-27 Thread schlie at comcast dot net
--- Additional Comments From schlie at comcast dot net 2005-07-27 16:22 --- (In reply to comment #4) > Oh, I agree completely that making string literals const > (as they are in C++) would make more sense. The reason they > aren't defined that way in C is that by the time "const" was >

[Bug c/23087] Misleading warning, "... differ in signedness"

2005-07-26 Thread kst at mib dot org
--- Additional Comments From kst at mib dot org 2005-07-27 01:54 --- Oh, I agree completely that making string literals const (as they are in C++) would make more sense. The reason they aren't defined that way in C is that by the time "const" was added to the language, there was too much

[Bug c/23087] Misleading warning, "... differ in signedness"

2005-07-26 Thread schlie at comcast dot net
--- Additional Comments From schlie at comcast dot net 2005-07-26 23:58 --- (In reply to comment #2) > String literals in C are char*, not const char*, though writing to a > string literal invokes undefined behavior. But that's not the point. Actually as string literals are defined as

[Bug c/23087] Misleading warning, "... differ in signedness"

2005-07-26 Thread kst at mib dot org
--- Additional Comments From kst at mib dot org 2005-07-26 21:07 --- String literals in C are char*, not const char*, though writing to a string literal invokes undefined behavior. But that's not the point. Assuming plain char is signed, the warning "pointer targets in initializatio

[Bug c/23087] Misleading warning, "... differ in signedness"

2005-07-26 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-26 20:03 --- I don't think the warning is misleading as strings are only ever "const char*" -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087