]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Handle GFC_STD_UNSIGNED like a standard in error messages.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 18 Oct 2024 15:58:56 +0000 (17:58 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 18 Oct 2024 15:58:56 +0000 (17:58 +0200)
gcc/fortran/ChangeLog:

* error.cc (notify_std_msg): Handle GFC_STD_UNSIGNED.

gcc/testsuite/ChangeLog:

* gfortran.dg/unsigned_37.f90: New test.

gcc/fortran/error.cc
gcc/testsuite/gfortran.dg/unsigned_37.f90 [new file with mode: 0644]

index d184ffd878ada9a1faab089fc11b0116ff59c8e1..afe2e49e4994ed04a3a9eb494aee317bb077a91a 100644 (file)
@@ -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 (file)
index 0000000..b11f214
--- /dev/null
@@ -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