https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103950

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|ASSIGNED                    |RESOLVED

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So I looked up the standard and it has the following to say about putchar/putc.
TC3 draft:
7.19.7.3/2:
The fputc function writes the character specified by c (converted to an
unsigned
char) 

7.19.7.9/2:
The putchar function is equivalent to putc with the second argument stdout.

C90 has the same wording.
4.9.7.3/2:

The fputc function writes the character specified by c (converted to an
unsigned char ) to the output stream pointed to by stream ...


So actually GCC is doing is correct.
If there is a bug it is in the libc you are using.

Reply via email to