gcc/libgfortran/runtime
François-Xavier Coudert 21423a1dfa 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.
2021-12-18 09:21:16 +01:00
..
backtrace.c Update copyright years. 2021-01-04 10:26:59 +01:00
bounds.c Update copyright years. 2021-01-04 10:26:59 +01:00
compile_options.c Update copyright years. 2021-01-04 10:26:59 +01:00
convert_char.c Update copyright years. 2021-01-04 10:26:59 +01:00
environ.c Fortran: Cast arguments of <ctype.h> functions to unsigned char 2021-12-18 09:21:16 +01:00
error.c Update copyright years. 2021-01-04 10:26:59 +01:00
fpu.c Update copyright years. 2021-01-04 10:26:59 +01:00
in_pack_generic.c Update copyright years. 2021-01-04 10:26:59 +01:00
in_unpack_generic.c Update copyright years. 2021-01-04 10:26:59 +01:00
ISO_Fortran_binding.c Fortran: Fix Bind(C) Array-Descriptor Conversion 2021-10-18 10:29:30 +02:00
main.c Update copyright years. 2021-01-04 10:26:59 +01:00
memory.c Update copyright years. 2021-01-04 10:26:59 +01:00
minimal.c Update copyright years. 2021-01-04 10:26:59 +01:00
pause.c Update copyright years. 2021-01-04 10:26:59 +01:00
select.c Update copyright years. 2021-01-04 10:26:59 +01:00
select_inc.c Update copyright years. 2021-01-04 10:26:59 +01:00
stop.c Update copyright years. 2021-01-04 10:26:59 +01:00
string.c libgfortran: Fix negation for largest integer [PR81986] 2021-03-03 08:07:16 +01:00