Commit 80298c3b by Arnaud Charlet

[multiple changes]

2014-06-13  Robert Dewar  <dewar@adacore.com>

	* exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
	reason to Overflow.

2014-06-13  Robert Dewar  <dewar@adacore.com>

	* makeutl.adb: Minor reformatting.

2014-06-13  Gail Schenker  <schenker@adacore.com>

	* debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
	associated flag (d.z), no longer needed.

2014-06-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
	Export aspects, do not check whether a corresponding Convention
	aspect has been specified. Convention is optional in Ada2012,
	and defaults to Convention_Ada.

From-SVN: r211624
parent 0083dd66
2014-06-13 Robert Dewar <dewar@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
reason to Overflow.
2014-06-13 Robert Dewar <dewar@adacore.com>
* makeutl.adb: Minor reformatting.
2014-06-13 Gail Schenker <schenker@adacore.com>
* debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
associated flag (d.z), no longer needed.
2014-06-13 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
Export aspects, do not check whether a corresponding Convention
aspect has been specified. Convention is optional in Ada2012,
and defaults to Convention_Ada.
2014-06-13 Eric Botcazou <ebotcazou@adacore.com> 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
* checks.adb (Apply_Address_Clause_Check): Only issue the new * checks.adb (Apply_Address_Clause_Check): Only issue the new
......
...@@ -116,7 +116,7 @@ package body Debug is ...@@ -116,7 +116,7 @@ package body Debug is
-- d.w Do not check for infinite loops -- d.w Do not check for infinite loops
-- d.x No exception handlers -- d.x No exception handlers
-- d.y -- d.y
-- d.z Temporary ASIS kludge for why non-static messages -- d.z
-- d.A Read/write Aspect_Specifications hash table to tree -- d.A Read/write Aspect_Specifications hash table to tree
-- d.B -- d.B
...@@ -599,11 +599,6 @@ package body Debug is ...@@ -599,11 +599,6 @@ package body Debug is
-- fully compiled and analyzed, they just get eliminated from the -- fully compiled and analyzed, they just get eliminated from the
-- code generation step. -- code generation step.
-- d.z Temporary debug switch for control of the why non-static messages
-- generated by Why_Non_Static. Normally these messages are suppressed
-- in ASIS mode (d2), but if d.z is set they are not suppressed. This
-- is a temporary switch to aid in updating ASIS base lines.
-- d.A There seems to be a problem with ASIS if we activate the circuit -- d.A There seems to be a problem with ASIS if we activate the circuit
-- for reading and writing the aspect specification hash table, so -- for reading and writing the aspect specification hash table, so
-- for now, this is controlled by the debug flag d.A. The hash table -- for now, this is controlled by the debug flag d.A. The hash table
......
...@@ -4536,7 +4536,7 @@ package body Exp_Attr is ...@@ -4536,7 +4536,7 @@ package body Exp_Attr is
Attribute_Name => Name_First, Attribute_Name => Name_First,
Prefix => Prefix =>
New_Occurrence_Of (Base_Type (Ptyp), Loc))), New_Occurrence_Of (Base_Type (Ptyp), Loc))),
Reason => CE_Range_Check_Failed), Reason => CE_Overflow_Check_Failed),
Suppress => All_Checks); Suppress => All_Checks);
end if; end if;
end; end;
...@@ -5611,7 +5611,7 @@ package body Exp_Attr is ...@@ -5611,7 +5611,7 @@ package body Exp_Attr is
Attribute_Name => Name_Last, Attribute_Name => Name_Last,
Prefix => Prefix =>
New_Occurrence_Of (Base_Type (Ptyp), Loc))), New_Occurrence_Of (Base_Type (Ptyp), Loc))),
Reason => CE_Range_Check_Failed), Reason => CE_Overflow_Check_Failed),
Suppress => All_Checks); Suppress => All_Checks);
end if; end if;
end; end;
......
...@@ -309,10 +309,10 @@ package body Makeutl is ...@@ -309,10 +309,10 @@ package body Makeutl is
if Replacement /= No_File then if Replacement /= No_File then
if Verbose_Mode then if Verbose_Mode then
Write_Line Write_Line
("source file" & ("source file"
Get_Name_String (SD.Sfile) & & Get_Name_String (SD.Sfile)
" has been replaced by " & & " has been replaced by "
Get_Name_String (Replacement)); & Get_Name_String (Replacement));
end if; end if;
return No_Name; return No_Name;
...@@ -648,10 +648,10 @@ package body Makeutl is ...@@ -648,10 +648,10 @@ package body Makeutl is
if Sw (J) = Directory_Separator then if Sw (J) = Directory_Separator then
Switch := Switch :=
new String' new String'
(Sw (1 .. Start - 1) & (Sw (1 .. Start - 1)
Parent & & Parent
Directory_Separator & & Directory_Separator
Sw (Start .. Sw'Last)); & Sw (Start .. Sw'Last));
return; return;
end if; end if;
end loop; end loop;
...@@ -659,10 +659,10 @@ package body Makeutl is ...@@ -659,10 +659,10 @@ package body Makeutl is
else else
Switch := Switch :=
new String' new String'
(Sw (1 .. Start - 1) & (Sw (1 .. Start - 1)
Parent & & Parent
Directory_Separator & & Directory_Separator
Sw (Start .. Sw'Last)); & Sw (Start .. Sw'Last));
end if; end if;
end if; end if;
...@@ -1999,8 +1999,8 @@ package body Makeutl is ...@@ -1999,8 +1999,8 @@ package body Makeutl is
if Project.Library then if Project.Library then
Fail_Program Fail_Program
(Tree, (Tree,
"cannot specify a main program " & "cannot specify a main program "
"for a library project file"); & "for a library project file");
end if; end if;
Add_Main (Name => Get_Name_String (Element.Value), Add_Main (Name => Get_Name_String (Element.Value),
...@@ -2118,8 +2118,8 @@ package body Makeutl is ...@@ -2118,8 +2118,8 @@ package body Makeutl is
if Names.Last = 0 then if Names.Last = 0 then
Fail_Program Fail_Program
(Project_Tree, (Project_Tree,
"cannot specify a multi-unit index but no main " & "cannot specify a multi-unit index but no main "
"on the command line"); & "on the command line");
elsif Names.Last > 1 then elsif Names.Last > 1 then
Fail_Program Fail_Program
...@@ -3313,13 +3313,12 @@ package body Makeutl is ...@@ -3313,13 +3313,12 @@ package body Makeutl is
then then
Prj.Err.Error_Msg Prj.Err.Error_Msg
(Env.Flags, (Env.Flags,
"Default_Switches forbidden in presence of " & "Default_Switches forbidden in presence of "
"Global_Compilation_Switches. Use Switches instead.", & "Global_Compilation_Switches. Use Switches instead.",
Project_Tree.Shared.Arrays.Table Project_Tree.Shared.Arrays.Table
(Default_Switches_Array).Location); (Default_Switches_Array).Location);
Fail_Program Fail_Program
(Project_Tree, (Project_Tree, "*** illegal combination of Builder attributes");
"*** illegal combination of Builder attributes");
end if; end if;
if Lang /= No_Name then if Lang /= No_Name then
...@@ -3433,14 +3432,14 @@ package body Makeutl is ...@@ -3433,14 +3432,14 @@ package body Makeutl is
Prj.Err.Error_Msg Prj.Err.Error_Msg
(Env.Flags, (Env.Flags,
'"' & Name_Buffer (1 .. Name_Len) & '"' & Name_Buffer (1 .. Name_Len)
""" is not a builder switch. Consider moving " & & """ is not a builder switch. Consider moving "
"it to Global_Compilation_Switches.", & "it to Global_Compilation_Switches.",
Element.Location); Element.Location);
Fail_Program Fail_Program
(Project_Tree, (Project_Tree,
"*** illegal switch """ & "*** illegal switch """
Get_Name_String (Element.Value) & '"'); & Get_Name_String (Element.Value) & '"');
end if; end if;
end if; end if;
......
...@@ -2704,50 +2704,12 @@ package body Sem_Ch13 is ...@@ -2704,50 +2704,12 @@ package body Sem_Ch13 is
Set_Never_Set_In_Source (E, False); Set_Never_Set_In_Source (E, False);
end if; end if;
-- Verify that there is an aspect Convention that will -- In older versions of Ada the corresponding pragmas
-- incorporate the Import/Export aspect, and eventual -- specified a Convention. In Ada 2012 the convention
-- Link/External names. -- is specified as a separate aspect, and it is optional,
-- given that it defaults to Convention_Ada. The code
declare -- that verifed that there was a matching convention
A : Node_Id; -- is now obsolete.
begin
A := First (L);
while Present (A) loop
exit when Chars (Identifier (A)) = Name_Convention;
Next (A);
end loop;
-- It is legal to specify Import for a variable, in
-- order to suppress initialization for it, without
-- specifying explicitly its convention. However this
-- is only legal if the convention of the object type
-- is Ada or similar.
if No (A) then
if Ekind (E) = E_Variable
and then A_Id = Aspect_Import
then
declare
C : constant Convention_Id :=
Convention (Etype (E));
begin
if C = Convention_Ada or else
C = Convention_Ada_Pass_By_Copy or else
C = Convention_Ada_Pass_By_Reference
then
goto Continue;
end if;
end;
end if;
-- Otherwise, Convention must be specified
Error_Msg_N
("missing Convention aspect for Export/Import",
Aspect);
end if;
end;
goto Continue; goto Continue;
end if; end if;
......
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