]> git.ipfire.org Git - thirdparty/gcc.git/commit
Introduce GFC_STD_UNSIGNED.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 11 Oct 2024 20:58:51 +0000 (22:58 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 11 Oct 2024 21:03:11 +0000 (23:03 +0200)
commit54b3f8e7bc0b572c1966aece20a0ac942aa4af97
treefae1d5bec00efcf7b4bb568ae642e7de9c5bc228
parentc92477e00068811be31c18428904e0d585fa5236
Introduce GFC_STD_UNSIGNED.

This patch creates an unsigned "standard" for the
gfc_option.allow_std field.

One of the main reason why people want UNSIGNED for Fortran is
interfacing for C.

This is a preparation for further work on the ISO_C_BINDING constants.
That, we do via iso-c-binding.def , whose last field is a standard
for the constant to be defined for the standard in question, which is
then checked.  I could try and invent a different method for this,
but I'd rather not.

gcc/fortran/ChangeLog:

* intrinsic.cc (add_functions): Convert uint and
selected_unsigned_kind to GFC_STD_UNSIGNED.
(gfc_check_intrinsic_standard): Handle GFC_STD_UNSIGNED.
* libgfortran.h (GFC_STD_UNSIGNED): Add.
* options.cc (gfc_post_options): Set GFC_STD_UNSIGNED
if -funsigned is set.
gcc/fortran/intrinsic.cc
gcc/fortran/libgfortran.h
gcc/fortran/options.cc