This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]