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

Bruno Haible <bruno at clisp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bruno at clisp dot org

--- Comment #6 from Bruno Haible <bruno at clisp dot org> ---
Created attachment 48440
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48440&action=edit
Test case

Another test case is the attached program, alpha.c. When run on glibc systems
on x86, x86_64, and other CPUs (not powerpc), it sign-extends the 'char'
argument; so the character 'ÿ' (in ISO-8859-1 encoding) becomes EOF, and the
<ctype.h> function returns 0.

$ LC_ALL=de_DE.ISO-8859-1 xterm
$ ./a.out ÿ
not alphabetic

The corrected program (with a cast to 'unsigned char' in the isalpha()
argument) behaves as expected:

$ LC_ALL=de_DE.ISO-8859-1 xterm
$ ./a.out ÿ
alphabetic

Reply via email to