This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/23087] Misleading warning, "... differ in signedness"
- From: "kst at mib dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jul 2005 21:07:50 -0000
- Subject: [Bug c/23087] Misleading warning, "... differ in signedness"
- References: <20050726195618.23087.kst@mib.org>
- Reply-to: gcc-bugzilla at gcc dot gnu 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 initialization differ in signedness"
for
signed char *ps = "signed?";
is misleading because the pointer targets don't differ in signedness.
They do differ in type, so a warning is appropriate, but not that warning.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087