public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR fortran/56985 - gcc/fortran/resolve.c:920: "'%s' in cannot appear in COMMON ..."
@ 2021-08-31 18:30 Harald Anlauf
  0 siblings, 0 replies; only message in thread
From: Harald Anlauf @ 2021-08-31 18:30 UTC (permalink / raw)
  To: fortran, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

I intend to commit the fix to the error message using the patch below
within the next 24h unless there are objections or better suggestions.

The unchanged part of the error message is already covered by
gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03 and does
not need to be adapted.

Thanks,
Harald


Fortran - improve wording of error message

gcc/fortran/ChangeLog:

	PR fortran/56985
	* resolve.c (resolve_common_vars): Fix grammar and improve wording
	of error message rejecting an unlimited polymorphic in COMMON.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pr56985.patch --]
[-- Type: text/x-patch, Size: 508 bytes --]

diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index f641d0d4dae..8e5ed1c032c 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -979,7 +979,7 @@ resolve_common_vars (gfc_common_head *common_block, bool named_common)
 	}

       if (UNLIMITED_POLY (csym))
-	gfc_error_now ("%qs in cannot appear in COMMON at %L "
+	gfc_error_now ("%qs at %L cannot appear in COMMON "
 		       "[F2008:C5100]", csym->name, &csym->declared_at);

       if (csym->ts.type != BT_DERIVED)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-31 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 18:30 [PATCH] PR fortran/56985 - gcc/fortran/resolve.c:920: "'%s' in cannot appear in COMMON ..." Harald Anlauf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).