Bug 71202 - GCC's -funsigned-char ignored by -Wpointer-sign
Summary: GCC's -funsigned-char ignored by -Wpointer-sign
Status: RESOLVED DUPLICATE of bug 23087
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 6.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2016-05-19 17:39 UTC by Campbell Barton
Modified: 2023-05-13 15:14 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Source file to reproduce the bug. (157 bytes, text/x-csrc)
2016-05-19 17:39 UTC, Campbell Barton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Campbell Barton 2016-05-19 17:39:07 UTC
Created attachment 38529 [details]
Source file to reproduce the bug.

When passing `char *` arguments to functions which take a `unsigned char *`, this raises a -Wpointer-sign warning, even when `-funsigned-char` is used.

Attached source file:

Compile with:

  gcc -funsigned-char -Wall foo.c
Comment 1 Andrew Pinski 2016-05-19 17:46:39 UTC
There are three distant types for char:
char, unsigned char, signed char.

-funsigned-char/-fsigned-char just changes the signedness of the pain char type, it does not change the type of char to be one of the other types.
Comment 2 Andrew Pinski 2023-05-12 18:27:50 UTC
The warning message issue with char is recorded as PR 23087 so moving this to be a dup of that issue.

*** This bug has been marked as a duplicate of bug 23087 ***