diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-07-18 12:12:41 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-07-18 12:12:41 +0200 |
commit | 50ea63572d0e1705c44eee2a8a5d16882093d0bc (patch) | |
tree | 55f14146a481d50e1106fd100d22f9f2da802ec3 /gcc | |
parent | c624298a19aa42cc335c33b980a17da2bbd7fb94 (diff) | |
download | gcc-50ea63572d0e1705c44eee2a8a5d16882093d0bc.zip gcc-50ea63572d0e1705c44eee2a8a5d16882093d0bc.tar.gz gcc-50ea63572d0e1705c44eee2a8a5d16882093d0bc.tar.bz2 |
[multiple changes]
2014-07-18 Robert Dewar <dewar@adacore.com>
* sem_prag.adb, sem_attr.adb,
sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
2014-07-18 Pascal Obry <obry@adacore.com>
* sysdep.c (__gnat_wide_text_translation_required): Removed from here.
* initialize.c (__gnat_wide_text_translation_required): Defined here.
2014-07-18 Pascal Obry <obry@adacore.com>
* adaint.c (__gnat_fputwc): New routine.
* s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
(Set_Stores_Attribute_Old_Prefix): New routine.
(Stores_Attribute_Old_Prefix): New routine.
(Write_Entity_Flags):
Output flag Stores_Attribute_Old_Prefix.
* einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
comment on usage.
(Set_Stores_Attribute_Old_Prefix): New routine
along with pragma Inline.
(Stores_Attribute_Old_Prefix): New
routine along with pragma Inline.
* exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
constant which captures the result of attribute 'Old's prefix.
* sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
relocated expression which acted as a prefix of attribute 'Old.
2014-07-18 Bob Duff <duff@adacore.com>
* s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
null before dispatching to Deallocate_Subpool.
* s-stposu.ads (Default_Subpool_For_Pool): Change mode of
parameter of Default_Subpool_For_Pool to 'in out'.
* s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
a message to the raise.
* sem_util.adb: Minor reformatting.
From-SVN: r212806
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 43 | ||||
-rw-r--r-- | gcc/ada/adaint.c | 11 | ||||
-rw-r--r-- | gcc/ada/einfo.adb | 17 | ||||
-rw-r--r-- | gcc/ada/einfo.ads | 27 | ||||
-rw-r--r-- | gcc/ada/exp_attr.adb | 6 | ||||
-rw-r--r-- | gcc/ada/initialize.c | 3 | ||||
-rw-r--r-- | gcc/ada/s-crtl.ads | 2 | ||||
-rw-r--r-- | gcc/ada/s-spsufi.adb | 21 | ||||
-rw-r--r-- | gcc/ada/s-stposu.adb | 10 | ||||
-rw-r--r-- | gcc/ada/s-stposu.ads | 10 | ||||
-rw-r--r-- | gcc/ada/sem_aggr.adb | 3 | ||||
-rw-r--r-- | gcc/ada/sem_attr.adb | 1 | ||||
-rw-r--r-- | gcc/ada/sem_eval.ads | 7 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 18 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 18 | ||||
-rw-r--r-- | gcc/ada/sinfo.ads | 8 | ||||
-rw-r--r-- | gcc/ada/sysdep.c | 2 |
17 files changed, 160 insertions, 47 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 99cdb1e..8bbebc0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,48 @@ 2014-07-18 Robert Dewar <dewar@adacore.com> + * sem_prag.adb, sem_attr.adb, + sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting. + +2014-07-18 Pascal Obry <obry@adacore.com> + + * sysdep.c (__gnat_wide_text_translation_required): Removed from here. + * initialize.c (__gnat_wide_text_translation_required): Defined here. + +2014-07-18 Pascal Obry <obry@adacore.com> + + * adaint.c (__gnat_fputwc): New routine. + * s-crtl.ads (fputwc): Now imported as __gnat_fputwc. + +2014-07-18 Hristian Kirtchev <kirtchev@adacore.com> + + * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix. + (Set_Stores_Attribute_Old_Prefix): New routine. + (Stores_Attribute_Old_Prefix): New routine. + (Write_Entity_Flags): + Output flag Stores_Attribute_Old_Prefix. + * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with + comment on usage. + (Set_Stores_Attribute_Old_Prefix): New routine + along with pragma Inline. + (Stores_Attribute_Old_Prefix): New + routine along with pragma Inline. + * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated + constant which captures the result of attribute 'Old's prefix. + * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a + relocated expression which acted as a prefix of attribute 'Old. + +2014-07-18 Bob Duff <duff@adacore.com> + + * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to + null before dispatching to Deallocate_Subpool. + * s-stposu.ads (Default_Subpool_For_Pool): Change mode of + parameter of Default_Subpool_For_Pool to 'in out'. + * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add + a message to the raise. + * sem_util.adb: Minor reformatting. + +2014-07-18 Robert Dewar <dewar@adacore.com> + * sem_util.adb (Check_Expression_Against_Static_Predicate): Mark expression as non-static if it fails static predicate check, and issue additional warning. diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 4d99c68..184d645 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -229,6 +229,7 @@ extern unsigned int LIB$CALLG_64 (unsigned long long argument_list [], #else #include <utime.h> +#include <wchar.h> #endif #if defined (_WIN32) @@ -851,6 +852,16 @@ __gnat_rmdir (char *path) #endif } +int +__gnat_fputwc(int c, FILE *stream) +{ +#if ! defined (__vxworks) && ! defined (IS_CROSS) + return fputwc ((wchar_t)c, stream); +#else + return fputc (c, stream); +#endif +} + FILE * __gnat_fopen (char *path, char *mode, int encoding ATTRIBUTE_UNUSED, char *vms_form ATTRIBUTE_UNUSED) diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index 39342a1..dbefc1a 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -211,7 +211,7 @@ package body Einfo is -- Generic_Renamings Elist23 -- Inner_Instances Elist23 -- Limited_View Node23 - -- Packed_Array_Impl_Type Node23 + -- Packed_Array_Impl_Type Node23 -- Protection_Object Node23 -- Stored_Constraint Elist23 @@ -560,13 +560,12 @@ package body Einfo is -- Has_Shift_Operator Flag267 -- Is_Independent Flag268 -- Has_Static_Predicate Flag269 + -- Stores_Attribute_Old_Prefix Flag270 -- (unused) Flag1 -- (unused) Flag2 -- (unused) Flag3 - -- (unused) Flag270 - -- (unused) Flag271 -- (unused) Flag272 -- (unused) Flag273 @@ -3004,6 +3003,11 @@ package body Einfo is return Elist23 (Id); end Stored_Constraint; + function Stores_Attribute_Old_Prefix (Id : E) return B is + begin + return Flag270 (Id); + end Stores_Attribute_Old_Prefix; + function Strict_Alignment (Id : E) return B is begin return Flag145 (Implementation_Base_Type (Id)); @@ -5784,6 +5788,12 @@ package body Einfo is Set_Elist23 (Id, V); end Set_Stored_Constraint; + procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is + begin + pragma Assert (Ekind (Id) = E_Constant); + Set_Flag270 (Id, V); + end Set_Stores_Attribute_Old_Prefix; + procedure Set_Strict_Alignment (Id : E; V : B := True) is begin pragma Assert (Id = Base_Type (Id)); @@ -8413,6 +8423,7 @@ package body Einfo is W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id)); W ("SPARK_Pragma_Inherited", Flag265 (Id)); W ("Static_Elaboration_Desired", Flag77 (Id)); + W ("Stores_Attribute_Old_Prefix", Flag270 (Id)); W ("Strict_Alignment", Flag145 (Id)); W ("Suppress_Elaboration_Warnings", Flag148 (Id)); W ("Suppress_Initialization", Flag105 (Id)); diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index eb1f7b7..fb55d1b 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -3909,15 +3909,6 @@ package Einfo is -- or the declaration of a "hook" object. -- In which case is it a flag, or a hook object??? --- Storage_Size_Variable (Node15) [implementation base type only] --- Defined in access types and task type entities. This flag is set --- if a valid and effective pragma Storage_Size applies to the base --- type. Points to the entity for a variable that is created to --- hold the value given in a Storage_Size pragma for an access --- collection or a task type. Note that in the access type case, --- this field is defined only in the root type (since derived types --- share the same storage pool). - -- Static_Elaboration_Desired (Flag77) -- Defined in library-level packages. Set by the pragma of the same -- name, to indicate that static initialization must be attempted for @@ -3933,6 +3924,15 @@ package Einfo is -- This attribute uses the same field as Overridden_Operation, which is -- irrelevant in init_procs. +-- Storage_Size_Variable (Node15) [implementation base type only] +-- Defined in access types and task type entities. This flag is set +-- if a valid and effective pragma Storage_Size applies to the base +-- type. Points to the entity for a variable that is created to +-- hold the value given in a Storage_Size pragma for an access +-- collection or a task type. Note that in the access type case, +-- this field is defined only in the root type (since derived types +-- share the same storage pool). + -- Stored_Constraint (Elist23) -- Defined in entities that can have discriminants (concurrent types -- subtypes, record types and subtypes, private types and subtypes, @@ -3940,6 +3940,10 @@ package Einfo is -- to an element list containing the expressions for each of the -- stored discriminants for the record (sub)type. +-- Stores_Attribute_Old_Prefix (Flag270) +-- Defined in constants. Set when the constant has been generated to save +-- the value of attribute 'Old's prefix. + -- Strict_Alignment (Flag145) [implementation base type only] -- Defined in all type entities. Indicates that some containing part -- is either aliased or tagged. This prohibits packing the object @@ -5423,6 +5427,7 @@ package Einfo is -- Is_Return_Object (Flag209) -- Is_True_Constant (Flag163) -- Is_Volatile (Flag16) + -- Stores_Attribute_Old_Prefix (Flag270) (constants only) -- Optimize_Alignment_Space (Flag241) (constants only) -- Optimize_Alignment_Time (Flag242) (constants only) -- Treat_As_Volatile (Flag41) @@ -6778,6 +6783,7 @@ package Einfo is function Status_Flag_Or_Transient_Decl (Id : E) return E; function Storage_Size_Variable (Id : E) return E; function Stored_Constraint (Id : E) return L; + function Stores_Attribute_Old_Prefix (Id : E) return B; function Strict_Alignment (Id : E) return B; function String_Literal_Length (Id : E) return U; function String_Literal_Low_Bound (Id : E) return N; @@ -7410,6 +7416,7 @@ package Einfo is procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E); procedure Set_Storage_Size_Variable (Id : E; V : E); procedure Set_Stored_Constraint (Id : E; V : L); + procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True); procedure Set_Strict_Alignment (Id : E; V : B := True); procedure Set_String_Literal_Length (Id : E; V : U); procedure Set_String_Literal_Low_Bound (Id : E; V : N); @@ -8192,6 +8199,7 @@ package Einfo is pragma Inline (Status_Flag_Or_Transient_Decl); pragma Inline (Storage_Size_Variable); pragma Inline (Stored_Constraint); + pragma Inline (Stores_Attribute_Old_Prefix); pragma Inline (Strict_Alignment); pragma Inline (String_Literal_Length); pragma Inline (String_Literal_Low_Bound); @@ -8623,6 +8631,7 @@ package Einfo is pragma Inline (Set_Status_Flag_Or_Transient_Decl); pragma Inline (Set_Storage_Size_Variable); pragma Inline (Set_Stored_Constraint); + pragma Inline (Set_Stores_Attribute_Old_Prefix); pragma Inline (Set_Strict_Alignment); pragma Inline (Set_String_Literal_Length); pragma Inline (Set_String_Literal_Low_Bound); diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index a0a147f..0232d67 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -4060,6 +4060,12 @@ package body Exp_Attr is begin Temp := Make_Temporary (Loc, 'T', Pref); + -- Set the entity kind now in order to mark the temporary as a + -- handler of attribute 'Old's prefix. + + Set_Ekind (Temp, E_Constant); + Set_Stores_Attribute_Old_Prefix (Temp); + -- Climb the parent chain looking for subprogram _Postconditions Subp := N; diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c index 1aba5fd..1eab275 100644 --- a/gcc/ada/initialize.c +++ b/gcc/ada/initialize.c @@ -62,6 +62,9 @@ extern "C" { /* __gnat_initialize (NT-mingw32 Version) */ /******************************************/ +char __gnat_wide_text_translation_required = 0; +// wide text translation, 0=none, 1=activated + #if defined (__MINGW32__) #include "mingw32.h" #include <windows.h> diff --git a/gcc/ada/s-crtl.ads b/gcc/ada/s-crtl.ads index 0e809ab..faa7031 100644 --- a/gcc/ada/s-crtl.ads +++ b/gcc/ada/s-crtl.ads @@ -123,7 +123,7 @@ package System.CRTL is pragma Import (C, fputc, "fputc"); function fputwc (C : int; stream : FILEs) return int; - pragma Import (C, fputwc, "fputwc"); + pragma Import (C, fputwc, "__gnat_fputwc"); function fputs (Strng : chars; Stream : FILEs) return int; pragma Import (C, fputs, "fputs"); diff --git a/gcc/ada/s-spsufi.adb b/gcc/ada/s-spsufi.adb index ef2c935..e6baee0 100644 --- a/gcc/ada/s-spsufi.adb +++ b/gcc/ada/s-spsufi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2014, 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- -- @@ -66,9 +66,22 @@ package body System.Storage_Pools.Subpools.Finalization is Free (Subpool.Node); - -- Dispatch to the user-defined implementation of Deallocate_Subpool - - Deallocate_Subpool (Pool_Of_Subpool (Subpool).all, Subpool); + -- Dispatch to the user-defined implementation of Deallocate_Subpool. It + -- is important to first set Subpool.Owner to null, because RM-13.11.5 + -- requires that "The subpool no longer belongs to any pool" BEFORE + -- calling Deallocate_Subpool. The actual dispatching call required is: + -- + -- Deallocate_Subpool(Pool_of_Subpool(Subpool).all, Subpool); + -- + -- but that can't be taken literally, because Pool_of_Subpool will + -- return null. + + declare + Owner : constant Any_Storage_Pool_With_Subpools_Ptr := Subpool.Owner; + begin + Subpool.Owner := null; + Deallocate_Subpool (Owner.all, Subpool); + end; Subpool := null; end Finalize_And_Deallocate; diff --git a/gcc/ada/s-stposu.adb b/gcc/ada/s-stposu.adb index cf43f22..31e8a7e 100644 --- a/gcc/ada/s-stposu.adb +++ b/gcc/ada/s-stposu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2014, 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- -- @@ -456,11 +456,13 @@ package body System.Storage_Pools.Subpools is ------------------------------ function Default_Subpool_For_Pool - (Pool : Root_Storage_Pool_With_Subpools) return not null Subpool_Handle + (Pool : in out Root_Storage_Pool_With_Subpools) + return not null Subpool_Handle is + pragma Unreferenced (Pool); begin - raise Program_Error; - return Pool.Subpools.Subpool; + return raise Program_Error with + "default Default_Subpool_For_Pool called; must be overridden"; end Default_Subpool_For_Pool; ------------ diff --git a/gcc/ada/s-stposu.ads b/gcc/ada/s-stposu.ads index c80dd9e..68f6b17 100644 --- a/gcc/ada/s-stposu.ads +++ b/gcc/ada/s-stposu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2014, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -95,16 +95,16 @@ package System.Storage_Pools.Subpools is (Pool : in out Root_Storage_Pool_With_Subpools; Subpool : in out Subpool_Handle) is abstract; + -- This precondition causes errors in simple tests, disabled for now??? + -- with Pre'Class => Pool_Of_Subpool (Subpool) = Pool'Access; - -- ??? This precondition causes errors in simple tests, disabled for now - - -- with Pre'Class => Pool_Of_Subpool (Subpool) = Pool'Access; -- This routine requires implementation. Reclaim the storage a particular -- subpool occupies in a pool_with_subpools. This routine is called by -- Ada.Unchecked_Deallocate_Subpool. function Default_Subpool_For_Pool - (Pool : Root_Storage_Pool_With_Subpools) return not null Subpool_Handle; + (Pool : in out Root_Storage_Pool_With_Subpools) + return not null Subpool_Handle; -- Return a common subpool which is used for object allocations without a -- Subpool_Handle_name in the allocator. The default implementation of this -- routine raises Program_Error. diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index b11b10a..0fe1937 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -2279,7 +2279,8 @@ package body Sem_Aggr is -- is fine, it's just the wrong length. We skip this check -- for standard character types (since there are no literals -- and it is too much trouble to concoct them), and also if - -- any of the bounds have not-known-at-compile-time values. + -- any of the bounds have values that are not known at + -- compile time. -- Another case warranting a warning is when the length is -- right, but as above we have an index type that is an diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 5a48f0e..9cb42b9 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -6349,6 +6349,7 @@ package body Sem_Attr is else Analyze_And_Resolve (Index, Etype (Index_Type)); + if not Is_OK_Static_Expression (Index) then Set_Do_Range_Check (Index); end if; diff --git a/gcc/ada/sem_eval.ads b/gcc/ada/sem_eval.ads index 7ade483..207e28a 100644 --- a/gcc/ada/sem_eval.ads +++ b/gcc/ada/sem_eval.ads @@ -367,9 +367,10 @@ package Sem_Eval is function Eval_Static_Predicate_Check (N : Node_Id; Typ : Entity_Id) return Boolean; - -- Evaluate a static predicate check applied to a known-at-compile-time - -- value N, which can be of a discrete, real, or string type. The caller - -- has checked that a static predicate does apply to Typ. + -- Evaluate a static predicate check applied expression which represents + -- a value that is known at compile time (does not have to be static). The + -- caller has checked that a static predicate does apply to Typ, and thus + -- the type is known to be scalar. procedure Fold_Str (N : Node_Id; Val : String_Id; Static : Boolean); -- Rewrite N with a new N_String_Literal node as the result of the compile diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index a1f6f9f..c32d89b 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -21937,9 +21937,9 @@ package body Sem_Prag is Item_Id := Available_View (Entity_Of (Item)); - return - Ekind (Item_Id) = E_Abstract_State - and then Has_Null_Refinement (Item_Id); + return Ekind (Item_Id) = E_Abstract_State + and then Has_Null_Refinement (Item_Id); + else return False; end if; @@ -22146,8 +22146,8 @@ package body Sem_Prag is if not Clause_Matched and then Is_In_Out_State_Clause - and then Contains - (Matched_Items, Available_View (Entity_Of (Dep_Input))) + and then + Contains (Matched_Items, Available_View (Entity_Of (Dep_Input))) then Clause_Matched := True; end if; @@ -22163,8 +22163,8 @@ package body Sem_Prag is if not Clause_Matched and then Is_Null_Refined_State (Dep_Input) and then Is_Entity_Name (Dep_Output) - and then Contains - (Matched_Items, Available_View (Entity_Of (Dep_Output))) + and then + Contains (Matched_Items, Available_View (Entity_Of (Dep_Output))) then Clause_Matched := True; end if; @@ -22180,8 +22180,8 @@ package body Sem_Prag is if not Clause_Matched and then Is_Null_Refined_State (Dep_Output) and then Is_Entity_Name (Dep_Input) - and then Contains - (Matched_Items, Available_View (Entity_Of (Dep_Input))) + and then + Contains (Matched_Items, Available_View (Entity_Of (Dep_Input))) then Clause_Matched := True; end if; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 34f68fe..ccebfe4 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -3477,12 +3477,13 @@ package body Sem_Util is -- In Ada 2012, If the type has an incomplete partial view, there -- may be primitive operations declared before the full view, so - -- we need to start scanning from the incomplete view. + -- we need to start scanning from the the incomplete view, which + -- is earlier on the entity chain. elsif Nkind (Parent (B_Type)) = N_Full_Type_Declaration and then Present (Incomplete_View (Parent (B_Type))) then - Id := Defining_Entity (Next (Incomplete_View (Parent (B_Type)))); + Id := Defining_Entity (Incomplete_View (Parent (B_Type))); else Id := Next_Entity (B_Type); @@ -8695,6 +8696,19 @@ package body Sem_Util is Prag := Original_Node (Par); exit; + -- The expansion of attribute 'Old generates a constant to capture + -- the result of the prefix. If the parent traversal reaches + -- one of these constants, then the node technically came from a + -- postcondition-like pragma. Note that the Ekind is not tested here + -- because N may be the expression of an object declaration which is + -- currently being analyzed. Such objects carry Ekind of E_Void. + + elsif Nkind (Par) = N_Object_Declaration + and then Constant_Present (Par) + and then Stores_Attribute_Old_Prefix (Defining_Entity (Par)) + then + return True; + -- Prevent the search from going too far elsif Is_Body_Or_Package_Declaration (Par) then diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 31c61e5..86d95305 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -1867,16 +1867,16 @@ package Sinfo is -- Parameter_List_Truncated (Flag17-Sem) -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set - -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as - -- a result of a First_Optional_Parameter specification in an - -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma. + -- (for OpenVMS ports of GNAT only) if the parameter list is truncated + -- as a result of a First_Optional_Parameter specification in one of the + -- pragmas Import_Function, Import_Procedure, or Import_Valued_Procedure. -- The truncation is done by the expander by removing trailing parameters -- from the argument list, in accordance with the set of rules allowing -- such parameter removal. In particular, parameters can be removed -- working from the end of the parameter list backwards up to and -- including the entry designated by First_Optional_Parameter in the -- Import pragma. Parameters can be removed if they are implicit and the - -- default value is a known-at-compile-time value, including the use of + -- default value is known at compile time value, including the use of -- the Null_Parameter attribute, or if explicit parameter values are -- present that match the corresponding defaults. diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 590a2ea..693fec2 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -131,7 +131,6 @@ extern struct tm *localtime_r(const time_t *, struct tm *); #if defined (WINNT) || defined (__CYGWIN__) const char __gnat_text_translation_required = 1; -char __gnat_wide_text_translation_required = 0; #ifdef __CYGWIN__ #define WIN_SETMODE setmode @@ -241,7 +240,6 @@ __gnat_ttyname (int filedes) #else const char __gnat_text_translation_required = 0; -const char __gnat_wide_text_translation_required = 0; /* These functions do nothing in non-DOS systems. */ |