diff options
author | Robert Dewar <dewar@adacore.com> | 2008-03-26 08:42:03 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-03-26 08:42:03 +0100 |
commit | d9f86c0c6cab087228394773d7b528c63e0a9969 (patch) | |
tree | 49ed46af481edd7d719287b170dade2b946c4501 /gcc/ada/sinfo.ads | |
parent | 9b91e15091b8d490e742ec04d8f1813c27f9cc13 (diff) | |
download | gcc-d9f86c0c6cab087228394773d7b528c63e0a9969.tar.gz |
sem_ch11.adb: Fix No_Exception_Restriction violation for SJLJ
2008-03-26 Robert Dewar <dewar@adacore.com>
* sem_ch11.adb: Fix No_Exception_Restriction violation for SJLJ
* sinfo.ads, sinfo.adb (From_At_End): New flag
From-SVN: r133576
Diffstat (limited to 'gcc/ada/sinfo.ads')
-rw-r--r-- | gcc/ada/sinfo.ads | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index d1f20176768..5c131465a92 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1032,6 +1032,13 @@ package Sinfo is -- could not determine that either direction is definitely safe, and a -- runtime check is required. + -- From_At_End (Flag4-Sem) + -- This flag is set on an N_Raise_Statement node if it corresponds to + -- the reraise statement generated as the last statement of an AT END + -- handler when SJLJ exception handling is active. It is used to stop + -- a bogus violation of restriction (No_Exception_Propagation), bogus + -- because if the restriction is set, the reraise is not generated. + -- From_At_Mod (Flag4-Sem) -- This flag is set on the attribute definition clause node that is -- generated by a transformation of an at mod phrase in a record @@ -1876,7 +1883,6 @@ package Sinfo is -- N_Pragma -- Sloc points to pragma identifier - -- Chars (Name1) identifier name from pragma identifier -- Pragma_Argument_Associations (List2) (set to No_List if none) -- Debug_Statement (Node3) (set to Empty if not Debug, Assert) -- Pragma_Identifier (Node4) @@ -1887,12 +1893,8 @@ package Sinfo is -- Psect_Object is always converted to Common_Object, but there are -- undoubtedly many other similar notes required ??? - -- Note: we don't really need the Chars field, since it can trivially - -- be obtained as Chars (Pragma_Identifier (Node)). However, it is - -- convenient to have this directly available, and historically the - -- Chars field has been around for ever, whereas the Pragma_Identifier - -- field was added much later (when we found the need to be able to get - -- the Sloc of the pragma identifier). + -- Note: a utility function Pragma_Name may be applied to pragma nodes + -- to conveniently obtain the Chars field of the Pragma_Identifier. -------------------------------------- -- 2.8 Pragma Argument Association -- @@ -5660,6 +5662,7 @@ package Sinfo is -- Sloc points to RAISE -- Name (Node2) (set to Empty if no exception name present) -- Expression (Node3) (set to Empty if no expression present) + -- From_At_End (Flag4-Sem) ------------------------------- -- 12.1 Generic Declaration -- @@ -6886,7 +6889,6 @@ package Sinfo is -- N_Has_Chars N_Empty, - N_Pragma, N_Pragma_Argument_Association, -- N_Has_Etype @@ -6983,10 +6985,8 @@ package Sinfo is N_Conditional_Expression, N_Explicit_Dereference, N_Function_Call, - N_Indexed_Component, N_Integer_Literal, - N_Null, N_Or_Else, N_Procedure_Call_Statement, @@ -7215,6 +7215,7 @@ package Sinfo is N_Package_Specification, N_Parameter_Association, N_Parameter_Specification, + N_Pragma, N_Protected_Definition, N_Range_Constraint, N_Real_Range_Specification, @@ -7796,6 +7797,9 @@ package Sinfo is function Forwards_OK (N : Node_Id) return Boolean; -- Flag5 + function From_At_End + (N : Node_Id) return Boolean; -- Flag4 + function From_At_Mod (N : Node_Id) return Boolean; -- Flag4 @@ -8666,6 +8670,9 @@ package Sinfo is procedure Set_From_At_Mod (N : Node_Id; Val : Boolean := True); -- Flag4 + procedure Set_From_At_End + (N : Node_Id; Val : Boolean := True); -- Flag4 + procedure Set_From_Default (N : Node_Id; Val : Boolean := True); -- Flag6 @@ -9238,6 +9245,14 @@ package Sinfo is pragma Inline (Nkind_In); -- Inline all above functions + ----------------------- + -- Utility Functions -- + ----------------------- + + function Pragma_Name (N : Node_Id) return Name_Id; + pragma Inline (Pragma_Name); + -- Convenient function to obtain Chars field of Pragma_Identifier + ----------------------------- -- Syntactic Parent Tables -- ----------------------------- @@ -10908,6 +10923,7 @@ package Sinfo is pragma Inline (Float_Truncate); pragma Inline (Formal_Type_Definition); pragma Inline (Forwards_OK); + pragma Inline (From_At_End); pragma Inline (From_At_Mod); pragma Inline (From_Default); pragma Inline (Generic_Associations); @@ -11194,6 +11210,7 @@ package Sinfo is pragma Inline (Set_Float_Truncate); pragma Inline (Set_Formal_Type_Definition); pragma Inline (Set_Forwards_OK); + pragma Inline (Set_From_At_End); pragma Inline (Set_From_At_Mod); pragma Inline (Set_From_Default); pragma Inline (Set_Generic_Associations); |