This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Make sure hides works with SPARK and SPARK_05


This is a followup patch that ensures that the hides directives
work with both SPARK_05 and the obsolete synonym SPARK (the latter
was broken by the previous patch).

The following programs compile as shown:

     1. pragma Restrictions (SPARK);
                             |
        >>> warning: restriction identifier "Spark" is obsolescent
        >>> warning: use restriction identifier "Spark_05" instead

     2. procedure SparkRes1a (X : Integer) is
     3.    --# hide SparkRes1a
     4.    subtype R is Integer range 1 .. X;
     5. begin
     6.    null;
     7. end SparkRes1a;

     1. pragma Restrictions (SPARK_05);
     2. procedure SparkRes2a (X : Integer) is
     3. --# hide SparkRes2a;
     4.    subtype R is Integer range 1 .. X;
     5. begin
     6.    null;
     7. end SparkRes2a;

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

2013-07-08  Robert Dewar  <dewar@adacore.com>

	* par-prag.adb (Process_Restrictions_Or_Restriction_Warnings):
	Recognize SPARK_05 as synonym for SPARK in restrictions pragma.
	* restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only
	referenced there.
	* scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb,
	sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK.
	* snames.ads-tmpl (Name_No_Obsolescent_Features): New entry.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]