From: Thomas Koenig Date: Fri, 18 Oct 2024 15:58:56 +0000 (+0200) Subject: Handle GFC_STD_UNSIGNED like a standard in error messages. X-Git-Tag: basepoints/gcc-16~5069 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f07dea91c37d45874cd91c2333696e784ae2d44;p=thirdparty%2Fgcc.git Handle GFC_STD_UNSIGNED like a standard in error messages. gcc/fortran/ChangeLog: * error.cc (notify_std_msg): Handle GFC_STD_UNSIGNED. gcc/testsuite/ChangeLog: * gfortran.dg/unsigned_37.f90: New test. --- diff --git a/gcc/fortran/error.cc b/gcc/fortran/error.cc index d184ffd878a..afe2e49e499 100644 --- a/gcc/fortran/error.cc +++ b/gcc/fortran/error.cc @@ -362,6 +362,8 @@ notify_std_msg(int std) return _("Obsolescent feature:"); else if (std & GFC_STD_F95_DEL) return _("Deleted feature:"); + else if (std & GFC_STD_UNSIGNED) + return _("Unsigned:"); else gcc_unreachable (); } diff --git a/gcc/testsuite/gfortran.dg/unsigned_37.f90 b/gcc/testsuite/gfortran.dg/unsigned_37.f90 new file mode 100644 index 00000000000..b11f214336a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/unsigned_37.f90 @@ -0,0 +1,4 @@ +! { dg-do compile } +program main + use iso_fortran_env, only : uint32 ! { dg-error "not in the selected standard" } +end program main