Commit 469fba4a by Arnaud Charlet

[multiple changes]

2014-10-17  Robert Dewar  <dewar@adacore.com>

	* lib-writ.ads, s-valdec.ads: Minor reformatting.

2014-10-17  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb: Additional work on function wrappers.

2014-10-17  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
	on the renamed object of renamings.

2014-10-17  Vincent Celier  <celier@adacore.com>

	* prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
	mode, always use the native target.

From-SVN: r216368
parent c36eadbe
2014-10-17 Robert Dewar <dewar@adacore.com>
* lib-writ.ads, s-valdec.ads: Minor reformatting.
2014-10-17 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb: Additional work on function wrappers.
2014-10-17 Eric Botcazou <ebotcazou@adacore.com>
* exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
on the renamed object of renamings.
2014-10-17 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
mode, always use the native target.
2014-10-16 Andrew MacLeod <amacleod@redhat.com> 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* gcc-interface/misc.c: Adjust include files. * gcc-interface/misc.c: Adjust include files.
......
...@@ -6884,10 +6884,18 @@ package body Exp_Util is ...@@ -6884,10 +6884,18 @@ package body Exp_Util is
-- If we have none of the above, it means that we have fallen off the -- If we have none of the above, it means that we have fallen off the
-- top testing prefixes recursively, and we now have a stand alone -- top testing prefixes recursively, and we now have a stand alone
-- object, where we don't have a problem. -- object, where we don't have a problem, unless this is a renaming,
-- in which case we need to look into the renamed object.
when others => when others =>
return False; if Is_Entity_Name (N)
and then Present (Renamed_Object (Entity (N)))
then
return
Possible_Bit_Aligned_Component (Renamed_Object (Entity (N)));
else
return False;
end if;
end case; end case;
end Possible_Bit_Aligned_Component; end Possible_Bit_Aligned_Component;
......
...@@ -375,10 +375,10 @@ package Lib.Writ is ...@@ -375,10 +375,10 @@ package Lib.Writ is
-- RN -- RN
-- In named notation, the restrictions are given as a series of lines, one -- In named notation, the restrictions are given as a series of lines,
-- per retrictions that is specified or violated (no information is present -- one per restrictions that is specified or violated (no information is
-- for restrictions that are not specified or violated). In the following -- present for restrictions that are not specified or violated). In the
-- name is the name of the restriction in all upper case. -- following name is the name of the restriction in all upper case.
-- For boolean restrictions, we have only two possibilities. A restrictions -- For boolean restrictions, we have only two possibilities. A restrictions
-- pragma is present, or a violation is detected: -- pragma is present, or a violation is detected:
......
...@@ -1592,6 +1592,16 @@ package body Prj.Conf is ...@@ -1592,6 +1592,16 @@ package body Prj.Conf is
Main_Project := No_Project; Main_Project := No_Project;
Automatically_Generated := False; Automatically_Generated := False;
-- Need a comment here saying why CodePeer mode is different ???
if CodePeer_Mode or else Target_Name = "" then
Opt.Target_Value := new String'(Normalized_Hostname);
Opt.Target_Origin := Default;
else
Opt.Target_Value := new String'(Target_Name);
Opt.Target_Origin := Specified;
end if;
Prj.Part.Parse Prj.Part.Parse
(In_Tree => Project_Node_Tree, (In_Tree => Project_Node_Tree,
Project => User_Project_Node, Project => User_Project_Node,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -69,11 +69,12 @@ package System.Val_Dec is ...@@ -69,11 +69,12 @@ package System.Val_Dec is
-- is greater than Max as required in this case. -- is greater than Max as required in this case.
function Value_Decimal (Str : String; Scale : Integer) return Integer; function Value_Decimal (Str : String; Scale : Integer) return Integer;
-- Used in computing X'Value (Str) where X is a decimal types whose size -- Used in computing X'Value (Str) where X is a decimal fixed-point type
-- does not exceed Standard.Integer'Size. Str is the string argument of -- whose size does not exceed Standard.Integer'Size. Str is the string
-- the attribute. Constraint_Error is raised if the string is malformed -- argument of the attribute. Constraint_Error is raised if the string
-- or if the value is out of range, otherwise the value returned is the -- is malformed or if the value is out of range of Integer (not the
-- value Integer'Integer_Value (decimal-literal-value), using the given -- range of the fixed-point type, that check must be done by the caller.
-- Scale to determine this value. -- Otherwise the value returned is the value Integer'Integer_Value
-- (decimal-literal-value), using Scale to determine this value.
end System.Val_Dec; end System.Val_Dec;
...@@ -1033,7 +1033,8 @@ package body Sem_Ch12 is ...@@ -1033,7 +1033,8 @@ package body Sem_Ch12 is
Func_Name : Node_Id; Func_Name : Node_Id;
Func : Entity_Id; Func : Entity_Id;
N_Parms : Natural; N_Parms : Natural;
Profile : List_Id; Parm_Type : Node_Id;
Profile : List_Id := New_List;
Spec : Node_Id; Spec : Node_Id;
F : Entity_Id; F : Entity_Id;
New_F : Entity_Id; New_F : Entity_Id;
...@@ -1055,7 +1056,7 @@ package body Sem_Ch12 is ...@@ -1055,7 +1056,7 @@ package body Sem_Ch12 is
Actuals := New_List; Actuals := New_List;
Profile := New_List; Profile := New_List;
F := First_Formal (Formal); F := First_Formal (Entity (Actual));
N_Parms := 0; N_Parms := 0;
while Present (F) loop while Present (F) loop
...@@ -1064,11 +1065,25 @@ package body Sem_Ch12 is ...@@ -1064,11 +1065,25 @@ package body Sem_Ch12 is
New_F := Make_Temporary New_F := Make_Temporary
(Loc, Character'Val (Character'Pos ('A') + N_Parms)); (Loc, Character'Val (Character'Pos ('A') + N_Parms));
-- If a formal has a class-wide type, rewrite as the corresponding
-- attribute, because the class-wide type is not retrievable by
-- visbility.
if Is_Class_Wide_Type (Etype (F)) then
Parm_Type :=
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Class,
Prefix =>
Make_Identifier (Loc, Chars (Etype (Etype (F)))));
else
Parm_Type := Make_Identifier (Loc, Chars (Etype (F)));
end if;
Append_To (Profile, Append_To (Profile,
Make_Parameter_Specification (Loc, Make_Parameter_Specification (Loc,
Defining_Identifier => New_F, Defining_Identifier => New_F,
Parameter_Type => Parameter_Type => Parm_Type));
Make_Identifier (Loc, Chars => Chars (Etype (F)))));
Append_To (Actuals, New_Occurrence_Of (New_F, Loc)); Append_To (Actuals, New_Occurrence_Of (New_F, Loc));
Next_Formal (F); Next_Formal (F);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment