aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/restrict.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-06-11 14:25:22 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-06-11 14:25:22 +0200
commit810241a5bfdbe0a3921916d3287eba6ef59ab575 (patch)
treeabae9747d4b5ac4bf69f8d9d20381f63a4858c08 /gcc/ada/restrict.adb
parent2c8d828a5fc1c18ef630ea45ce1ff13638d97918 (diff)
downloadgcc-810241a5bfdbe0a3921916d3287eba6ef59ab575.zip
gcc-810241a5bfdbe0a3921916d3287eba6ef59ab575.tar.gz
gcc-810241a5bfdbe0a3921916d3287eba6ef59ab575.tar.bz2
2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
* gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par> option to specify the result file encoding. 2014-06-11 Robert Dewar <dewar@adacore.com> * errout.ads, sem_ch12.adb: Minor reformatting. * debug.adb, erroutc.adb: Remove -gnatd.q debug switch. * lib-xref.adb: Minor reformatting. * restrict.adb: Minor code reorganization (put routines in alpha order). From-SVN: r211455
Diffstat (limited to 'gcc/ada/restrict.adb')
-rw-r--r--gcc/ada/restrict.adb132
1 files changed, 66 insertions, 66 deletions
diff --git a/gcc/ada/restrict.adb b/gcc/ada/restrict.adb
index 78591c1..a376efe 100644
--- a/gcc/ada/restrict.adb
+++ b/gcc/ada/restrict.adb
@@ -274,72 +274,6 @@ package body Restrict is
Check_Restriction (No_Implicit_Heap_Allocations, N);
end Check_No_Implicit_Heap_Alloc;
- -------------------------------------------
- -- Check_Restriction_No_Use_Of_Attribute --
- --------------------------------------------
-
- procedure Check_Restriction_No_Use_Of_Attribute (N : Node_Id) is
- Id : constant Name_Id := Chars (N);
- A_Id : constant Attribute_Id := Get_Attribute_Id (Id);
-
- begin
- -- Ignore call if node N is not in the main source unit, since we only
- -- give messages for the main unit. This avoids giving messages for
- -- aspects that are specified in withed units.
-
- if not In_Extended_Main_Source_Unit (N) then
- return;
- end if;
-
- -- If nothing set, nothing to check
-
- if not No_Use_Of_Attribute_Set then
- return;
- end if;
-
- Error_Msg_Sloc := No_Use_Of_Attribute (A_Id);
-
- if Error_Msg_Sloc /= No_Location then
- Error_Msg_Node_1 := N;
- Error_Msg_Warn := No_Use_Of_Attribute_Warning (A_Id);
- Error_Msg_N
- ("<*<violation of restriction `No_Use_Of_Attribute '='> &`#", N);
- end if;
- end Check_Restriction_No_Use_Of_Attribute;
-
- ----------------------------------------
- -- Check_Restriction_No_Use_Of_Pragma --
- ----------------------------------------
-
- procedure Check_Restriction_No_Use_Of_Pragma (N : Node_Id) is
- Id : constant Node_Id := Pragma_Identifier (N);
- P_Id : constant Pragma_Id := Get_Pragma_Id (Chars (Id));
-
- begin
- -- Ignore call if node N is not in the main source unit, since we only
- -- give messages for the main unit. This avoids giving messages for
- -- aspects that are specified in withed units.
-
- if not In_Extended_Main_Source_Unit (N) then
- return;
- end if;
-
- -- If nothing set, nothing to check
-
- if not No_Use_Of_Pragma_Set then
- return;
- end if;
-
- Error_Msg_Sloc := No_Use_Of_Pragma (P_Id);
-
- if Error_Msg_Sloc /= No_Location then
- Error_Msg_Node_1 := Id;
- Error_Msg_Warn := No_Use_Of_Pragma_Warning (P_Id);
- Error_Msg_N
- ("<*<violation of restriction `No_Use_Of_Pragma '='> &`#", Id);
- end if;
- end Check_Restriction_No_Use_Of_Pragma;
-
-----------------------------------
-- Check_Obsolescent_2005_Entity --
-----------------------------------
@@ -696,6 +630,72 @@ package body Restrict is
end if;
end Check_Restriction_No_Specification_Of_Aspect;
+ -------------------------------------------
+ -- Check_Restriction_No_Use_Of_Attribute --
+ --------------------------------------------
+
+ procedure Check_Restriction_No_Use_Of_Attribute (N : Node_Id) is
+ Id : constant Name_Id := Chars (N);
+ A_Id : constant Attribute_Id := Get_Attribute_Id (Id);
+
+ begin
+ -- Ignore call if node N is not in the main source unit, since we only
+ -- give messages for the main unit. This avoids giving messages for
+ -- aspects that are specified in withed units.
+
+ if not In_Extended_Main_Source_Unit (N) then
+ return;
+ end if;
+
+ -- If nothing set, nothing to check
+
+ if not No_Use_Of_Attribute_Set then
+ return;
+ end if;
+
+ Error_Msg_Sloc := No_Use_Of_Attribute (A_Id);
+
+ if Error_Msg_Sloc /= No_Location then
+ Error_Msg_Node_1 := N;
+ Error_Msg_Warn := No_Use_Of_Attribute_Warning (A_Id);
+ Error_Msg_N
+ ("<*<violation of restriction `No_Use_Of_Attribute '='> &`#", N);
+ end if;
+ end Check_Restriction_No_Use_Of_Attribute;
+
+ ----------------------------------------
+ -- Check_Restriction_No_Use_Of_Pragma --
+ ----------------------------------------
+
+ procedure Check_Restriction_No_Use_Of_Pragma (N : Node_Id) is
+ Id : constant Node_Id := Pragma_Identifier (N);
+ P_Id : constant Pragma_Id := Get_Pragma_Id (Chars (Id));
+
+ begin
+ -- Ignore call if node N is not in the main source unit, since we only
+ -- give messages for the main unit. This avoids giving messages for
+ -- aspects that are specified in withed units.
+
+ if not In_Extended_Main_Source_Unit (N) then
+ return;
+ end if;
+
+ -- If nothing set, nothing to check
+
+ if not No_Use_Of_Pragma_Set then
+ return;
+ end if;
+
+ Error_Msg_Sloc := No_Use_Of_Pragma (P_Id);
+
+ if Error_Msg_Sloc /= No_Location then
+ Error_Msg_Node_1 := Id;
+ Error_Msg_Warn := No_Use_Of_Pragma_Warning (P_Id);
+ Error_Msg_N
+ ("<*<violation of restriction `No_Use_Of_Pragma '='> &`#", Id);
+ end if;
+ end Check_Restriction_No_Use_Of_Pragma;
+
--------------------------------------
-- Check_Wide_Character_Restriction --
--------------------------------------