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>
* checks.adb (Apply_Address_Clause_Check): Only issue the new
......
......@@ -116,7 +116,7 @@ package body Debug is
-- d.w Do not check for infinite loops
-- d.x No exception handlers
-- 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.B
......@@ -599,11 +599,6 @@ package body Debug is
-- fully compiled and analyzed, they just get eliminated from the
-- 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
-- for reading and writing the aspect specification hash table, so
-- for now, this is controlled by the debug flag d.A. The hash table
......
......@@ -4536,7 +4536,7 @@ package body Exp_Attr is
Attribute_Name => Name_First,
Prefix =>
New_Occurrence_Of (Base_Type (Ptyp), Loc))),
Reason => CE_Range_Check_Failed),
Reason => CE_Overflow_Check_Failed),
Suppress => All_Checks);
end if;
end;
......@@ -5611,7 +5611,7 @@ package body Exp_Attr is
Attribute_Name => Name_Last,
Prefix =>
New_Occurrence_Of (Base_Type (Ptyp), Loc))),
Reason => CE_Range_Check_Failed),
Reason => CE_Overflow_Check_Failed),
Suppress => All_Checks);
end if;
end;
......
......@@ -309,10 +309,10 @@ package body Makeutl is
if Replacement /= No_File then
if Verbose_Mode then
Write_Line
("source file" &
Get_Name_String (SD.Sfile) &
" has been replaced by " &
Get_Name_String (Replacement));
("source file"
& Get_Name_String (SD.Sfile)
& " has been replaced by "
& Get_Name_String (Replacement));
end if;
return No_Name;
......@@ -648,10 +648,10 @@ package body Makeutl is
if Sw (J) = Directory_Separator then
Switch :=
new String'
(Sw (1 .. Start - 1) &
Parent &
Directory_Separator &
Sw (Start .. Sw'Last));
(Sw (1 .. Start - 1)
& Parent
& Directory_Separator
& Sw (Start .. Sw'Last));
return;
end if;
end loop;
......@@ -659,10 +659,10 @@ package body Makeutl is
else
Switch :=
new String'
(Sw (1 .. Start - 1) &
Parent &
Directory_Separator &
Sw (Start .. Sw'Last));
(Sw (1 .. Start - 1)
& Parent
& Directory_Separator
& Sw (Start .. Sw'Last));
end if;
end if;
......@@ -1999,8 +1999,8 @@ package body Makeutl is
if Project.Library then
Fail_Program
(Tree,
"cannot specify a main program " &
"for a library project file");
"cannot specify a main program "
& "for a library project file");
end if;
Add_Main (Name => Get_Name_String (Element.Value),
......@@ -2118,8 +2118,8 @@ package body Makeutl is
if Names.Last = 0 then
Fail_Program
(Project_Tree,
"cannot specify a multi-unit index but no main " &
"on the command line");
"cannot specify a multi-unit index but no main "
& "on the command line");
elsif Names.Last > 1 then
Fail_Program
......@@ -3153,10 +3153,10 @@ package body Makeutl is
if Current_Verbosity = High then
Debug_Output ("compilation phases: "
& " compile=" & Data.Need_Compilation'Img
& " bind=" & Data.Need_Binding'Img
& " link=" & Data.Need_Linking'Img
& " bind=" & Data.Need_Binding'Img
& " link=" & Data.Need_Linking'Img
& " closure=" & Data.Closure_Needed'Img
& " mains=" & Data.Number_Of_Mains'Img,
& " mains=" & Data.Number_Of_Mains'Img,
Project.Name);
end if;
end Do_Compute;
......@@ -3313,13 +3313,12 @@ package body Makeutl is
then
Prj.Err.Error_Msg
(Env.Flags,
"Default_Switches forbidden in presence of " &
"Global_Compilation_Switches. Use Switches instead.",
"Default_Switches forbidden in presence of "
& "Global_Compilation_Switches. Use Switches instead.",
Project_Tree.Shared.Arrays.Table
(Default_Switches_Array).Location);
Fail_Program
(Project_Tree,
"*** illegal combination of Builder attributes");
(Project_Tree, "*** illegal combination of Builder attributes");
end if;
if Lang /= No_Name then
......@@ -3433,14 +3432,14 @@ package body Makeutl is
Prj.Err.Error_Msg
(Env.Flags,
'"' & Name_Buffer (1 .. Name_Len) &
""" is not a builder switch. Consider moving " &
"it to Global_Compilation_Switches.",
'"' & Name_Buffer (1 .. Name_Len)
& """ is not a builder switch. Consider moving "
& "it to Global_Compilation_Switches.",
Element.Location);
Fail_Program
(Project_Tree,
"*** illegal switch """ &
Get_Name_String (Element.Value) & '"');
"*** illegal switch """
& Get_Name_String (Element.Value) & '"');
end if;
end if;
......
......@@ -2704,50 +2704,12 @@ package body Sem_Ch13 is
Set_Never_Set_In_Source (E, False);
end if;
-- Verify that there is an aspect Convention that will
-- incorporate the Import/Export aspect, and eventual
-- Link/External names.
declare
A : Node_Id;
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;
-- In older versions of Ada the corresponding pragmas
-- specified a Convention. In Ada 2012 the convention
-- is specified as a separate aspect, and it is optional,
-- given that it defaults to Convention_Ada. The code
-- that verifed that there was a matching convention
-- is now obsolete.
goto Continue;
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