Patchwork [Ada] Clarify message for missing pragma argument identifier

login
register
mail settings
Submitter Arnaud Charlet
Date June 14, 2010, 1:47 p.m.
Message ID <20100614134720.GA12773@adacore.com>
Download mbox | patch
Permalink /patch/55536/
State New
Headers show

Comments

Arnaud Charlet - June 14, 2010, 1:47 p.m.
This patch clarifies the message for a missing pragma argument
identifier, as shown by this test program:

     1. pragma Restrictions
     2.   (Max_asynchronous_select_nesting => 0,
     3.    No_task_hierarchy);
           |
        >>> pragma argument identifier required here
        >>> since previous argument had identifier (RM 2.8(4))

     4. procedure PAI_Message is
     5. begin
     6.    null;
     7. end;

Tested on x86_64-pc-linux-gnu, committed on trunk

2010-06-14  Robert Dewar  <dewar@adacore.com>

	* par-ch2.adb (Scan_Pragma_Argument_Association): Clarify message for
	missing pragma argument identifier.

Patch

Index: par-ch2.adb
===================================================================
--- par-ch2.adb	(revision 160705)
+++ par-ch2.adb	(working copy)
@@ -503,7 +503,9 @@  package body Ch2 is
 
       if Identifier_Seen and not Id_Present then
          Error_Msg_SC
-           ("|pragma argument identifier required here (RM 2.8(4))");
+           ("|pragma argument identifier required here");
+         Error_Msg_SC
+           ("\since previous argument had identifier (RM 2.8(4))");
       end if;
 
       if Id_Present then