https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103950
--- Comment #10 from Andrew Pinski ---
Note the reason why the standard is written this way is because in K C, every
function argument was promoted to int as there were no prototypes and then the
function would cast it back to char/unsigned
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103950
--- Comment #9 from Andrew Pinski ---
strchr has the same wording too:
The strchr function locates the first occurrence of c (converted to a char ) in
the string pointed to by s .
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103950
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103950
--- Comment #7 from Andrew Pinski ---
(In reply to Thorsten Otto from comment #6)
> A similar fix will be needed in gimple_fold_builtin_fputs
Yes agreed.
gimple_fold_builtin_strstr should do the same, though I don't know if it will
matter but
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103950
--- Comment #6 from Thorsten Otto ---
A similar fix will be needed in gimple_fold_builtin_fputs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103950
Andrew Pinski changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103950
Richard Biener changed:
What|Removed |Added
Priority|P3 |P2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103950
--- Comment #4 from Andrew Pinski ---
>That happens even if -funsigned-char is used.
Yes because in this case, GCC is using char internally and forgetting it is
signed by default when calling a function as shown by my patch.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103950
Andrew Pinski changed:
What|Removed |Added
Target Milestone|--- |9.5
Summary|printf("\xff")