[multiple changes]
2010-09-09 Doug Rupp <rupp@adacore.com> * sem_prag.adb (pragma Ident): Pass --identification= vice IDENTIFICATION= * gnatlink.adb (Linker_Options): Look for --identification= vice IDENTIFICATION= 2010-09-09 Gary Dismukes <dismukes@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference, case Attribute_Old): When inserting and analyzing the object declaration for the temporary object created to hold a 'Old value, push the scope for the subprogram where the object is inserted, so that its Scope (and that of related objects) will be set properly. From-SVN: r164088
This commit is contained in:
parent
d09b9f672b
commit
7425962bec
|
@ -1,3 +1,18 @@
|
||||||
|
2010-09-09 Doug Rupp <rupp@adacore.com>
|
||||||
|
|
||||||
|
* sem_prag.adb (pragma Ident): Pass --identification= vice
|
||||||
|
IDENTIFICATION=
|
||||||
|
* gnatlink.adb (Linker_Options): Look for --identification= vice
|
||||||
|
IDENTIFICATION=
|
||||||
|
|
||||||
|
2010-09-09 Gary Dismukes <dismukes@adacore.com>
|
||||||
|
|
||||||
|
* exp_attr.adb (Expand_N_Attribute_Reference, case Attribute_Old): When
|
||||||
|
inserting and analyzing the object declaration for the temporary object
|
||||||
|
created to hold a 'Old value, push the scope for the subprogram where
|
||||||
|
the object is inserted, so that its Scope (and that of related objects)
|
||||||
|
will be set properly.
|
||||||
|
|
||||||
2010-09-09 Vincent Celier <celier@adacore.com>
|
2010-09-09 Vincent Celier <celier@adacore.com>
|
||||||
|
|
||||||
* prj.adb (Get_Object_Directory): Return object directory display name
|
* prj.adb (Get_Object_Directory): Return object directory display name
|
||||||
|
|
|
@ -3011,7 +3011,8 @@ package body Exp_Attr is
|
||||||
and then Chars (Defining_Entity (Subp)) /= Name_uPostconditions;
|
and then Chars (Defining_Entity (Subp)) /= Name_uPostconditions;
|
||||||
end loop;
|
end loop;
|
||||||
|
|
||||||
-- Insert the assignment at the start of the declarations
|
-- Insert the initialized object declaration at the start of the
|
||||||
|
-- subprogram's declarations.
|
||||||
|
|
||||||
Asn_Stm :=
|
Asn_Stm :=
|
||||||
Make_Object_Declaration (Loc,
|
Make_Object_Declaration (Loc,
|
||||||
|
@ -3020,6 +3021,16 @@ package body Exp_Attr is
|
||||||
Object_Definition => New_Occurrence_Of (Etype (N), Loc),
|
Object_Definition => New_Occurrence_Of (Etype (N), Loc),
|
||||||
Expression => Pref);
|
Expression => Pref);
|
||||||
|
|
||||||
|
-- Push the subprogram's scope, so that the object will be analyzed
|
||||||
|
-- in that context (rather than the context of the Precondition
|
||||||
|
-- subprogram) and will have its Scope set properly.
|
||||||
|
|
||||||
|
if Present (Corresponding_Spec (Subp)) then
|
||||||
|
Push_Scope (Corresponding_Spec (Subp));
|
||||||
|
else
|
||||||
|
Push_Scope (Defining_Entity (Subp));
|
||||||
|
end if;
|
||||||
|
|
||||||
if Is_Empty_List (Declarations (Subp)) then
|
if Is_Empty_List (Declarations (Subp)) then
|
||||||
Set_Declarations (Subp, New_List (Asn_Stm));
|
Set_Declarations (Subp, New_List (Asn_Stm));
|
||||||
Analyze (Asn_Stm);
|
Analyze (Asn_Stm);
|
||||||
|
@ -3027,6 +3038,8 @@ package body Exp_Attr is
|
||||||
Insert_Action (First (Declarations (Subp)), Asn_Stm);
|
Insert_Action (First (Declarations (Subp)), Asn_Stm);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
Pop_Scope;
|
||||||
|
|
||||||
Rewrite (N, New_Occurrence_Of (Tnn, Loc));
|
Rewrite (N, New_Occurrence_Of (Tnn, Loc));
|
||||||
end Old;
|
end Old;
|
||||||
|
|
||||||
|
|
|
@ -2144,9 +2144,9 @@ begin
|
||||||
|
|
||||||
-- Remove duplicate IDENTIFICATION directives (VMS)
|
-- Remove duplicate IDENTIFICATION directives (VMS)
|
||||||
|
|
||||||
if Linker_Options.Table (J)'Length > 27
|
if Linker_Options.Table (J)'Length > 29
|
||||||
and then Linker_Options.Table (J) (1 .. 28)
|
and then Linker_Options.Table (J) (1 .. 30)
|
||||||
= "--for-linker=IDENTIFICATION="
|
= "--for-linker=--identification="
|
||||||
then
|
then
|
||||||
if IDENT_Op then
|
if IDENT_Op then
|
||||||
Linker_Options.Table (J .. Linker_Options.Last - 1) :=
|
Linker_Options.Table (J .. Linker_Options.Last - 1) :=
|
||||||
|
|
|
@ -7845,12 +7845,12 @@ package body Sem_Prag is
|
||||||
|
|
||||||
else
|
else
|
||||||
-- In VMS, the effect of IDENT is achieved by passing
|
-- In VMS, the effect of IDENT is achieved by passing
|
||||||
-- IDENTIFICATION=name as a --for-linker switch.
|
-- --identification=name as a --for-linker switch.
|
||||||
|
|
||||||
if OpenVMS_On_Target then
|
if OpenVMS_On_Target then
|
||||||
Start_String;
|
Start_String;
|
||||||
Store_String_Chars
|
Store_String_Chars
|
||||||
("--for-linker=IDENTIFICATION=");
|
("--for-linker=--identification=");
|
||||||
String_To_Name_Buffer (Strval (Str));
|
String_To_Name_Buffer (Strval (Str));
|
||||||
Store_String_Chars (Name_Buffer (1 .. Name_Len));
|
Store_String_Chars (Name_Buffer (1 .. Name_Len));
|
||||||
|
|
||||||
|
@ -7860,7 +7860,7 @@ package body Sem_Prag is
|
||||||
-- associated with a with'd package.
|
-- associated with a with'd package.
|
||||||
|
|
||||||
Replace_Linker_Option_String
|
Replace_Linker_Option_String
|
||||||
(End_String, "--for-linker=IDENTIFICATION=");
|
(End_String, "--for-linker=--identification=");
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
Set_Ident_String (Current_Sem_Unit, Str);
|
Set_Ident_String (Current_Sem_Unit, Str);
|
||||||
|
|
Loading…
Reference in New Issue