public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Anonymous "access all" error message
@ 2008-05-22  7:21 Arnaud Charlet
  0 siblings, 0 replies; only message in thread
From: Arnaud Charlet @ 2008-05-22  7:21 UTC (permalink / raw)
  To: gcc-patches; +Cc: Hristian Kirtchev

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

Tested on i686-linux, committed on trunk

This patch changes the error message when compiling anonymous access types
with "all" in Ada 95 mode.

2008-05-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* par-ch3.adb
	(P_Access_Definition): Change the error message when parsing "access
	all" in Ada 95 mode. The message no longer forces the user to recompile
	in 05 mode only to discover that anonymous access types are not allowed
	to have "all".


[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 578 bytes --]

Index: par-ch3.adb
===================================================================
--- par-ch3.adb	(revision 134945)
+++ par-ch3.adb	(working copy)
@@ -3931,8 +3931,7 @@ package body Ch3 is
          if Token = Tok_All then
             if Ada_Version < Ada_05 then
                Error_Msg_SP
-                 ("access-all in this context is an Ada 2005 extension");
-               Error_Msg_SP ("\unit should be compiled with -gnat05 switch");
+                 ("ALL is not permitted for anonymous access types");
             end if;
 
             Scan; -- past ALL

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

only message in thread, other threads:[~2008-05-22  7:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-22  7:21 [Ada] Anonymous "access all" error message Arnaud Charlet

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).