From 320eb42df09f3cb96fea9a7b090ae61d9edb20b6 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Mon, 10 Jan 2022 10:29:40 -0500 Subject: [Ada] Use "aspect" instead of "pragma" in warnings For warnings related to the Unreferenced, Unmodified, and Unused aspects, refer to the "aspect", not the "pragma". Note that the aspect can be set by an aspect_specification or a pragma, so the term "aspect" is correct even in the pragma case. However, messages in sem_prag.adb use Fix_Error, so they refer to "aspect" or "pragma". It's not clear that we really ought to refer to "pragma", now that those are obsolete, but de call Fix_Error for uniformity. We do not attempt to make Fix_Error available outside sem_prag.adb -- too much trouble for something that perhaps ought to be removed. gcc/ada/ * lib-xref.adb, sem_util.adb: Change wording of warning messages to use "aspect". * sem_prag.adb: Use Fix_Error to change wording of warnings. * doc/gnat_rm/implementation_defined_pragmas.rst: Minor: fix cut&paste error. * gnat_rm.texi: Regenerate. --- gcc/ada/lib-xref.adb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/ada/lib-xref.adb') diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb index 359e006..610a4bd 100644 --- a/gcc/ada/lib-xref.adb +++ b/gcc/ada/lib-xref.adb @@ -936,10 +936,10 @@ package body Lib.Xref is if Chars (BE) = Chars (E) then if Has_Pragma_Unused (E) then Error_Msg_NE -- CODEFIX - ("??pragma Unused given for&!", N, BE); + ("??aspect Unused specified for&!", N, BE); else Error_Msg_NE -- CODEFIX - ("??pragma Unreferenced given for&!", N, BE); + ("??aspect Unreferenced specified for&!", N, BE); end if; exit; end if; @@ -952,10 +952,10 @@ package body Lib.Xref is elsif Has_Pragma_Unused (E) then Error_Msg_NE -- CODEFIX - ("??pragma Unused given for&!", N, E); + ("??aspect Unused specified for&!", N, E); else Error_Msg_NE -- CODEFIX - ("??pragma Unreferenced given for&!", N, E); + ("??aspect Unreferenced specified for&!", N, E); end if; end if; -- cgit v1.1