aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2021-12-16 18:38:30 +0100
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2021-12-18 09:21:16 +0100
commit21423a1dfa079d4cd218f69d2fab9fe65a69fedb (patch)
tree08f1191472543839ad785d3bc99b304118528fba /gcc
parentf18cbc1ee1f421a0dd79dc389bef9a23dd4a761d (diff)
downloadgcc-21423a1dfa079d4cd218f69d2fab9fe65a69fedb.zip
gcc-21423a1dfa079d4cd218f69d2fab9fe65a69fedb.tar.gz
gcc-21423a1dfa079d4cd218f69d2fab9fe65a69fedb.tar.bz2
Fortran: Cast arguments of <ctype.h> functions to unsigned char
Functions from <ctype.h> should only be called on values that can be represented by unsigned char. On targets where char is a signed type, some of libgfortran calls have undefined behaviour. The solution is to cast the argument to unsigned char type. I’ve defined macros in libgfortran.h to do so, to retain legibility of the library code. PR libfortran/95177 libgfortran/ChangeLog * libgfortran.h: include ctype.h, provide safe macros. * io/format.c: use safe macros. * io/list_read.c: use safe macros. * io/read.c: use safe macros. * io/write.c: use safe macros. * runtime/environ.c: use safe macros.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions