summaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-12 13:35:06 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-12 13:35:06 +0000
commit51ea9c9440406d01a3861f1b049fd21af47f2a5d (patch)
tree1a9201953396433c912575f685057fb0d68ffec1 /gcc/ada/sinfo.adb
parent992b365fdf434d5057d48b4d0ab1bab19c4b4801 (diff)
downloadgcc-51ea9c9440406d01a3861f1b049fd21af47f2a5d.tar.gz
2013-04-12 Robert Dewar <dewar@adacore.com>
* einfo.adb (Has_Dynamic_Predicate_Aspect): New flag. (Has_Static_Predicate_Aspect): New flag. * einfo.ads (Has_Dynamic_Predicate_Aspect): New flag. (Has_Static_Predicate_Aspect): New flag. * exp_ch9.adb: Minor reformatting. * exp_util.adb (Make_Invariant_Call): Check_Enabled now handles synonyms. * gnat1drv.adb: Remove setting of Debug_Pragmas_Enabled, since this switch is gone and control of Debug is done with Assertions_Enabled. * gnat_rm.texi: Update documentation for Assertion_Policy and Check_Policy pragmas. * opt.adb (Debug_Pragmas_Disabled[_Config]): Removed (Debug_Pragmas_Enabled[_Config]): Removed Since debug now controlled by Assertion_Enabled. * opt.ads (Debug_Pragmas_Disabled[_Config]): Removed (Debug_Pragmas_Enabled[_Config]): Removed Since debug now controlled by Assertion_Enabled. * par-ch2.adb (Scan_Pragma_Argument_Association): Allow new 'Class forms. * sem_attr.adb: Minor reformatting. * sem_ch13.adb (Analyze_Aspect_Specification): Disable aspect if DISABLE policy applies. * sem_ch6.adb (Grab_PPC): Check original name of aspect for aspect from pragma (Process_PPCs): Properly check assertion policy. * sem_prag.adb (Check_Enabled): Rewritten for new Assertion_Policy (Check_Appicable_Policy): New procedure. (Is_Valid_Assertion_Kind): New function. (Rewrite_Assertion_Kind): New procedure. (Analyze_Pragma): Handle case of disabled assertion pragma. (Analyze_Pragma, case Assertion_Policy): Rewritten for Ada 2012. (Analyze_Pragma, case Check): Deal with 'Class possibilities. (Analyze_Pragma, case Check_Policy): Deal with 'Class possibilities. (Analyze_Pragma, case Contract_Class): New handling of ignored pragma. (Analyze_Pragma, case Debug): New control with Assertion_Policy. (Analyze_Pragma, case Debug_Policy): Now consistent with Assertion_Policy. (Analyze_Pragma, case Loop_Invariant): New handling of ignored pragma. (Analyze_Pragma, case Loop_Variant): New handling of ignored pragma. (Analyze_Pragma, case Precondition): Use proper name for Check pragma. (Analyze_Pragma, case Check_Enabled): Rewritten for new policy stuff. * sem_prag.ads (Check_Enabled): Rewritten for new Assertion_Policy stuff. (Check_Appicable_Policy): New procedure. * sinfo.adb (Is_Disabled): New flag. (Is_Ignored): New flag. * sinfo.ads (Is_Disabled): New flag. (Is_Ignored): New flag. (N_Pragma_Argument_Association): New 'Class forms. * snames.ads-tmpl: New names Name_uPre, Name_uPost, Name_uType_Invariant, Name_uInvariant. * switch-c.adb: Remove setting of Debug_Pragmas_Enabled for -gnata. * tree_io.ads (ASIS_Version_Number): Updated (remove read write of obsolete flags Debug_Pragmas_Disabled and Debug_Pragmas_Enabled. 2013-04-12 Ed Schonberg <schonberg@adacore.com> * exp_aggr.adb (Get_Explicit_Discriminant_Value): Subsidiary of Build_Record_Aggr_Code, used to retrieve explicit values for inherited discriminants in an extension aggregate, when the ancestor type is unconstrained. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197915 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r--gcc/ada/sinfo.adb36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb
index 3c9096fb944..dc7d973867f 100644
--- a/gcc/ada/sinfo.adb
+++ b/gcc/ada/sinfo.adb
@@ -1740,6 +1740,15 @@ package body Sinfo is
return Flag16 (N);
end Is_Controlling_Actual;
+ function Is_Disabled
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Aspect_Specification
+ or else NT (N).Nkind = N_Pragma);
+ return Flag15 (N);
+ end Is_Disabled;
+
function Is_Delayed_Aspect
(N : Node_Id) return Boolean is
begin
@@ -1798,6 +1807,15 @@ package body Sinfo is
return Flag4 (N);
end Is_Folded_In_Parser;
+ function Is_Ignored
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Aspect_Specification
+ or else NT (N).Nkind = N_Pragma);
+ return Flag9 (N);
+ end Is_Ignored;
+
function Is_In_Discriminant_Check
(N : Node_Id) return Boolean is
begin
@@ -4832,6 +4850,15 @@ package body Sinfo is
Set_Flag14 (N, Val);
end Set_Is_Delayed_Aspect;
+ procedure Set_Is_Disabled
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Aspect_Specification
+ or else NT (N).Nkind = N_Pragma);
+ Set_Flag15 (N, Val);
+ end Set_Is_Disabled;
+
procedure Set_Is_Dynamic_Coextension
(N : Node_Id; Val : Boolean := True) is
begin
@@ -4880,6 +4907,15 @@ package body Sinfo is
Set_Flag4 (N, Val);
end Set_Is_Folded_In_Parser;
+ procedure Set_Is_Ignored
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Aspect_Specification
+ or else NT (N).Nkind = N_Pragma);
+ Set_Flag9 (N, Val);
+ end Set_Is_Ignored;
+
procedure Set_Is_In_Discriminant_Check
(N : Node_Id; Val : Boolean := True) is
begin