summaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-25 15:18:38 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-25 15:18:38 +0000
commit86d32751c892c00803ee5f7b2b4956828c5f72fd (patch)
treea81062ae0baf3aa2bb0c6da8826d7061c88ae465 /gcc/ada/einfo.adb
parentaf6f2cb79134ace14b22612ac5a0669917ddf83a (diff)
downloadgcc-86d32751c892c00803ee5f7b2b4956828c5f72fd.tar.gz
2014-02-25 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb (Has_Shift_Operator): New flag. * gnat_rm.texi: Document pragma Provide_Shift_Operators. * interfac.ads: Minor code reorganization (add pragma Compiler_Unit_Warning). * par-prag.adb: Add dummy entry for Provide_Shift_Operators. * sem_ch3.adb (Build_Derived_Numeric_Type): Copy Has_Shift_Operator flag. * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure Check_Shift is always called (Check_Shift): Set Has_Shift_Operator. * sem_prag.adb: Implement pragma Provide_Shift_Operators. * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators Add entry for Name_Amount. * checks.adb (Selected_Range_Checks): When checking for a null range, make sure we use the base type, and not the subtype for deciding a range is null. * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check for suspicious loop bound which is outside the range of the loop subtype. * gnat_ugn.texi: Add documentation section "Determining the Chosen Elaboration Order" * sem_ch13.adb (UC_Entry): Add field Act_Unit (Validate_Unchecked_Conversion): Store Act_Unit (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit * treepr.adb: Minor reformatting. 2014-02-25 Arnaud Charlet <charlet@adacore.com> * usage.adb: Minor: fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208138 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r--gcc/ada/einfo.adb15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 01ec45a457d..076cf7bf057 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -557,12 +557,12 @@ package body Einfo is
-- Is_Discriminant_Check_Function Flag264
-- SPARK_Pragma_Inherited Flag265
-- SPARK_Aux_Pragma_Inherited Flag266
+ -- Has_Shift_Operator Flag267
-- (unused) Flag1
-- (unused) Flag2
-- (unused) Flag3
- -- (unused) Flag267
-- (unused) Flag268
-- (unused) Flag269
-- (unused) Flag270
@@ -1667,6 +1667,12 @@ package body Einfo is
return Flag143 (Id);
end Has_Recursive_Call;
+ function Has_Shift_Operator (Id : E) return B is
+ begin
+ pragma Assert (Is_Integer_Type (Id));
+ return Flag267 (Base_Type (Id));
+ end Has_Shift_Operator;
+
function Has_Size_Clause (Id : E) return B is
begin
return Flag29 (Id);
@@ -4372,6 +4378,12 @@ package body Einfo is
Set_Flag143 (Id, V);
end Set_Has_Recursive_Call;
+ procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
+ begin
+ pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
+ Set_Flag267 (Id, V);
+ end Set_Has_Shift_Operator;
+
procedure Set_Has_Size_Clause (Id : E; V : B := True) is
begin
Set_Flag29 (Id, V);
@@ -8203,6 +8215,7 @@ package body Einfo is
W ("Has_RACW", Flag214 (Id));
W ("Has_Record_Rep_Clause", Flag65 (Id));
W ("Has_Recursive_Call", Flag143 (Id));
+ W ("Has_Shift_Operator", Flag267 (Id));
W ("Has_Size_Clause", Flag29 (Id));
W ("Has_Small_Clause", Flag67 (Id));
W ("Has_Specified_Layout", Flag100 (Id));