aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-04 11:57:02 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-04 11:57:02 +0200
commit4fdebd93e0b117dc4363d2552ca886623075e1a8 (patch)
tree7946b22e7f13f198a60bc32005dd7fccb3114188 /gcc
parent6aaa058707f9d29c01aae3c7823a3d184d0e777f (diff)
downloadgcc-4fdebd93e0b117dc4363d2552ca886623075e1a8.zip
gcc-4fdebd93e0b117dc4363d2552ca886623075e1a8.tar.gz
gcc-4fdebd93e0b117dc4363d2552ca886623075e1a8.tar.bz2
[multiple changes]
2011-08-04 Arnaud Charlet <charlet@adacore.com> * debug.adb: Update comment. 2011-08-04 Robert Dewar <dewar@adacore.com> * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb, sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads, exp_ch6.adb: Minor reformatting. 2011-08-04 Gary Dismukes <dismukes@adacore.com> * gnat_ugn.texi: Add sentence about the case of compile-time-detected checks for -gnateE. 2011-08-04 Ed Schonberg <schonberg@adacore.com> * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM. 2011-08-04 Thomas Quinot <quinot@adacore.com> * sinfo.ads: Minor reformatting. 2011-08-04 Emmanuel Briot <briot@adacore.com> * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error even if there is no location. From-SVN: r177351
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog28
-rw-r--r--gcc/ada/a-tags.adb3
-rw-r--r--gcc/ada/debug.adb2
-rw-r--r--gcc/ada/exp_ch4.adb10
-rw-r--r--gcc/ada/exp_ch6.adb1
-rw-r--r--gcc/ada/exp_util.adb2
-rw-r--r--gcc/ada/g-comlin.adb16
-rw-r--r--gcc/ada/g-comlin.ads7
-rw-r--r--gcc/ada/gnat_rm.texi42
-rw-r--r--gcc/ada/gnat_ugn.texi5
-rw-r--r--gcc/ada/make.adb2
-rw-r--r--gcc/ada/makeutl.adb48
-rw-r--r--gcc/ada/makeutl.ads3
-rw-r--r--gcc/ada/par_sco.adb1
-rw-r--r--gcc/ada/prj-nmsc.adb2
-rw-r--r--gcc/ada/sem_attr.adb5
-rw-r--r--gcc/ada/sem_prag.adb4
-rw-r--r--gcc/ada/sem_util.adb4
-rw-r--r--gcc/ada/sinfo.ads6
19 files changed, 134 insertions, 57 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 827850e..40d753b 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,31 @@
+2011-08-04 Arnaud Charlet <charlet@adacore.com>
+
+ * debug.adb: Update comment.
+
+2011-08-04 Robert Dewar <dewar@adacore.com>
+
+ * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
+ sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
+ exp_ch6.adb: Minor reformatting.
+
+2011-08-04 Gary Dismukes <dismukes@adacore.com>
+
+ * gnat_ugn.texi: Add sentence about the case of compile-time-detected
+ checks for -gnateE.
+
+2011-08-04 Ed Schonberg <schonberg@adacore.com>
+
+ * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
+
+2011-08-04 Thomas Quinot <quinot@adacore.com>
+
+ * sinfo.ads: Minor reformatting.
+
+2011-08-04 Emmanuel Briot <briot@adacore.com>
+
+ * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
+ even if there is no location.
+
2011-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb, sem_ch4.adb: move check for restriction
diff --git a/gcc/ada/a-tags.adb b/gcc/ada/a-tags.adb
index d347307..0fbb602 100644
--- a/gcc/ada/a-tags.adb
+++ b/gcc/ada/a-tags.adb
@@ -317,8 +317,6 @@ package body Ada.Tags is
Dup_Ext_Tag : constant String := "duplicated external tag """;
- -- Start of processing for Check_TSD
-
begin
-- Verify that the external tag of this TSD is not registered in the
-- runtime hash table.
@@ -326,6 +324,7 @@ package body Ada.Tags is
T := External_Tag_HTable.Get (To_Address (TSD.External_Tag));
if T /= null then
+
-- Avoid concatenation, as it is not allowed in no run time mode
declare
diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb
index 35d1ced..e024927 100644
--- a/gcc/ada/debug.adb
+++ b/gcc/ada/debug.adb
@@ -429,7 +429,7 @@ package body Debug is
-- especially in the predefined library units.
-- dQ Eliminate check for duplicate external tags. This check was added
- -- for GNAT 6.4.1, and causes some backward compatibility problems.
+ -- as per AI 0113, and causes some backward compatibility problems.
-- It is never legitimate to have duplicate external tags, so the
-- check is certainly valid, but this debug switch can be useful for
-- enabling previous behavior of ignoring this problem.
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index afe0c06..a5b3bdc 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -4319,7 +4319,7 @@ package body Exp_Ch4 is
------------------------------
procedure Process_Transient_Object (Decl : Node_Id) is
- Ins_Nod : constant Node_Id := Parent (N);
+ Ins_Nod : constant Node_Id := Parent (N);
-- To avoid the insertion of generated code in the list of Actions,
-- Insert_Action must look at the parent field of the EWA.
@@ -4353,10 +4353,9 @@ package body Exp_Ch4 is
Defining_Identifier => Ptr_Id,
Type_Definition =>
Make_Access_To_Object_Definition (Loc,
- All_Present =>
+ All_Present =>
Ekind (Obj_Typ) = E_General_Access_Type,
- Subtype_Indication =>
- New_Reference_To (Desig_Typ, Loc)));
+ Subtype_Indication => New_Reference_To (Desig_Typ, Loc)));
Insert_Action (Ins_Nod, Ptr_Decl);
Analyze (Ptr_Decl);
@@ -4389,8 +4388,7 @@ package body Exp_Ch4 is
else
Expr :=
Make_Attribute_Reference (Loc,
- Prefix =>
- New_Reference_To (Obj_Id, Loc),
+ Prefix => New_Reference_To (Obj_Id, Loc),
Attribute_Name => Name_Unrestricted_Access);
end if;
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 9fda91c..dfa5b3f 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -4715,6 +4715,7 @@ package body Exp_Ch6 is
declare
Flag_Id : constant Entity_Id :=
Return_Flag_Or_Transient_Decl (Ret_Obj_Id);
+
begin
-- Generate:
-- Fnn := True;
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 2fd4e44..aaf7e3c 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -2712,7 +2712,7 @@ package body Exp_Util is
elsif Ekind (Obj_Id) = E_Variable
and then
(Is_Simple_Protected_Type (Obj_Typ)
- or else Has_Simple_Protected_Object (Obj_Typ))
+ or else Has_Simple_Protected_Object (Obj_Typ))
then
return True;
end if;
diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb
index 0d75289..5f5855f 100644
--- a/gcc/ada/g-comlin.adb
+++ b/gcc/ada/g-comlin.adb
@@ -2138,10 +2138,10 @@ package body GNAT.Command_Line is
Success : out Boolean)
is
procedure Add_Simple_Switch
- (Simple : String;
- Sepa : String;
- Param : String;
- Index : Integer);
+ (Simple : String;
+ Sepa : String;
+ Param : String;
+ Index : Integer);
-- Add a new switch that has had all its aliases expanded, and switches
-- ungrouped. We know there are no more aliases in Switches.
@@ -2150,10 +2150,10 @@ package body GNAT.Command_Line is
-----------------------
procedure Add_Simple_Switch
- (Simple : String;
- Sepa : String;
- Param : String;
- Index : Integer)
+ (Simple : String;
+ Sepa : String;
+ Param : String;
+ Index : Integer)
is
Sep : Character;
diff --git a/gcc/ada/g-comlin.ads b/gcc/ada/g-comlin.ads
index 3b50894..0c4c96e 100644
--- a/gcc/ada/g-comlin.ads
+++ b/gcc/ada/g-comlin.ads
@@ -599,8 +599,8 @@ package GNAT.Command_Line is
-- format (trailing ':', '?', etc for defining a switch with parameters).
--
-- Switch should also start with the leading '-' (or any other characters).
- -- If this character is not '-', you will need to call
- -- Initialize_Option_Scan to set the proper character for the parser.
+ -- If this character is not '-', you need to call Initialize_Option_Scan to
+ -- set the proper character for the parser.
--
-- The switches defined in the command_line_configuration object are used
-- when ungrouping switches with more that one character after the prefix.
@@ -843,10 +843,13 @@ package GNAT.Command_Line is
-- "-from:", the separator defaults to a space. But if your application
-- uses unusual separators not supported by GNAT.Command_Line (for instance
-- it requires ":"), you can specify this separator here.
+ --
-- For instance,
-- Add_Switch(Cmd, "-from", "bar", ':')
+ --
-- results in
-- -from:bar
+ --
-- rather than the default
-- -from bar
--
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 3a3c86c..46b8d53 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -4178,20 +4178,20 @@ the ceiling priority of the corresponding protected object.
plus the following set of restrictions:
@table @code
-@item Max_Entry_Queue_Length = 1
+@item Max_Entry_Queue_Length => 1
Defines the maximum number of calls that are queued on a (protected) entry.
Note that this restrictions is checked at run time. Violation of this
restriction results in the raising of Program_Error exception at the point of
the call. For the Profile (Ravenscar) the value of Max_Entry_Queue_Length is
always 1 and hence no task can be queued on a protected entry.
-@item Max_Protected_Entries = 1
+@item Max_Protected_Entries => 1
[RM D.7] Specifies the maximum number of entries per protected type. The
bounds of every entry family of a protected unit shall be static, or shall be
defined by a discriminant of a subtype whose corresponding bound is static.
For the Profile (Ravenscar) the value of Max_Protected_Entries is always 1.
-@item Max_Task_Entries = 0
+@item Max_Task_Entries => 0
[RM D.7] Specifies the maximum number of entries
per task. The bounds of every entry family
of a task unit shall be static, or shall be
@@ -4205,13 +4205,6 @@ the Profile (Ravenscar), the value of Max_Task_Entries is always
[RM D.7] There are no abort_statements, and there are
no calls to Task_Identification.Abort_Task.
-@item No_Asynchronous_Control
-There are no semantic dependences on the package
-Asynchronous_Task_Control.
-
-@item No_Calendar
-There are no semantic dependencies on the package Ada.Calendar.
-
@item No_Dynamic_Attachment
There is no call to any of the operations defined in package Ada.Interrupts
(Is_Reserved, Is_Attached, Current_Handler, Attach_Handler, Exchange_Handler,
@@ -4252,9 +4245,6 @@ or to Ada.Task_Termination.Specific_Handler.
[RM D.7] There are no allocators for task types
or types containing task subcomponents.
-@item No_Task_Attributes_Package
-There are no semantic dependencies on the Ada.Task_Attributes package.
-
@item No_Task_Hierarchy
[RM D.7] All (non-environment) tasks depend
directly on the environment task of the partition.
@@ -4262,19 +4252,35 @@ directly on the environment task of the partition.
@item No_Task_Termination
Tasks which terminate are erroneous.
+@item Simple_Barriers
+Entry barrier condition expressions shall be either static
+boolean expressions or boolean objects which are declared in
+the protected type which contains the entry.
+
@item No_Unchecked_Conversion
There are no semantic dependencies on the Ada.Unchecked_Conversion package.
@item No_Unchecked_Deallocation
There are no semantic dependencies on the Ada.Unchecked_Deallocation package.
-@item Simple_Barriers
-Entry barrier condition expressions shall be either static
-boolean expressions or boolean objects which are declared in
-the protected type which contains the entry.
@end table
+@noindent
+
+The Ravenscar profile also includes the following restrictions that specify
+that there are no semantic dependences on the corresponding predefined
+packages:
+
+@table
+@item No_Dependence => Ada.Asynchronous_Task_Control
+@item No_Dependence => Ada.Calendar
+@item No_Dependence => Ada.Execution_Time.Group_Budget
+@item No_Dependence => Ada.Execution_Time.Timers
+@item No_Dependence => Ada.Task_Attributes
+@item No_Dependence => System.Multiprocessors.Dispatching_Domains
+@end table
@noindent
+
This set of configuration pragmas and restrictions correspond to the
definition of the ``Ravenscar Profile'' for limited tasking, devised and
published by the @cite{International Real-Time Ada Workshop}, 1997,
@@ -17943,7 +17949,7 @@ A complete description of the AIs may be found in
@item
@emph{AI-0216 No_Task_Hierarchy forbids local tasks (0000-00-00)}
-@cindex AI-0216 (Ada 2012 feature)
+@cindex AI05-0216 (Ada 2012 feature)
@noindent
It is clearly the intention that @code{No_Task_Hierarchy} is intended to
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 862278c..76436c3 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -4115,9 +4115,12 @@ Defines a symbol, associated with @var{value}, for preprocessing.
@item -gnateE
@cindex @option{-gnateE} (@command{gcc})
-Generate extra information in exception messages, in particular display
+Generate extra information in exception messages. In particular, display
extra column information and the value and range associated with index and
range check failures, and extra column information for access checks.
+In cases where the compiler is able to determine at compile time that
+a check will fail, it gives a warning, and the extra information is not
+produced at run time.
@item -gnatef
@cindex @option{-gnatef} (@command{gcc})
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index 7ae52f1..289979f 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -1622,7 +1622,7 @@ package body Make is
if Operating_Mode = Check_Semantics then
declare
- File_Name : String := Get_Name_String (Source_File);
+ File_Name : String := Get_Name_String (Source_File);
OK : Boolean := False;
begin
diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb
index cced36f..97bf8e1 100644
--- a/gcc/ada/makeutl.adb
+++ b/gcc/ada/makeutl.adb
@@ -32,6 +32,7 @@ with Hostparm;
with Osint; use Osint;
with Output; use Output;
with Opt; use Opt;
+with Prj.Err;
with Prj.Ext;
with Prj.Util; use Prj.Util;
with Sinput.P;
@@ -1269,7 +1270,8 @@ package body Makeutl is
--------------------
procedure Complete_Mains
- (Root_Project : Project_Id;
+ (Flags : Processing_Flags;
+ Root_Project : Project_Id;
Project_Tree : Project_Tree_Ref)
is
procedure Do_Complete (Project : Project_Id; Tree : Project_Tree_Ref);
@@ -1292,11 +1294,13 @@ package body Makeutl is
Source : Prj.Source_Id := No_Source;
Suffix : File_Name_Type;
Iter : Source_Iterator;
+ Is_Absolute : Boolean := False;
begin
if Base_Name (Main) /= Main then
if Is_Absolute_Path (Main) then
Main_Id := Create_Name (Base_Name (Main));
+ Is_Absolute := True;
else
Fail_Program
(Tree,
@@ -1316,17 +1320,27 @@ package body Makeutl is
end if;
if File.Tree = null then
- File.Tree := Project_Tree;
+ File.Tree := Tree;
end if;
if File.Source = null then
+ if Current_Verbosity = High then
+ Debug_Output
+ ("Search for main """ & Main
+ & """ in "
+ & Get_Name_String (Debug_Name (File.Tree))
+ & ", project", Project.Name);
+ end if;
-- First, look for the main as specified.
+ -- We need to search for the base name though, and
+ -- if needed check later that we found the correct
+ -- file.
Source := Find_Source
(In_Tree => File.Tree,
Project => File.Project,
- Base_Name => File.File,
+ Base_Name => Main_Id,
Index => File.Index);
if Source = No_Source then
@@ -1373,9 +1387,22 @@ package body Makeutl is
Project := Project.Extends;
end loop;
end;
+
+ else
+ if Is_Absolute then
+ if File_Name_Type (Source.Path.Display_Name) /=
+ File.File
+ then
+ Debug_Output
+ ("Found a non-matching file",
+ Name_Id (Source.Path.Display_Name));
+ Source := No_Source;
+ end if;
+ end if;
end if;
if Source /= No_Source then
+
Debug_Output ("Found main in project",
Source.Project.Name);
Names.Table (J).File := Source.File;
@@ -1402,9 +1429,10 @@ package body Makeutl is
Error_Msg_File_1 := Main_Id;
Error_Msg_Name_1 := Root_Project.Name;
- Errutil.Error_Msg
- ("{ is not a source of project %%",
- File.Location);
+ Prj.Err.Error_Msg
+ (Flags,
+ "{ is not a source of project %%",
+ File.Location, Project);
end if;
end if;
end;
@@ -1420,6 +1448,14 @@ package body Makeutl is
begin
Complete_All (Root_Project, Project_Tree);
+
+ if Mains.Count_Of_Mains_With_No_Tree > 0 then
+ for J in Names.First .. Names.Last loop
+ Fail_Program
+ (Project_Tree, '"' & Get_Name_String (Names.Table (J).File)
+ & """ is not a source of any project");
+ end loop;
+ end if;
end Complete_Mains;
------------
diff --git a/gcc/ada/makeutl.ads b/gcc/ada/makeutl.ads
index 29e9e1a..7660749 100644
--- a/gcc/ada/makeutl.ads
+++ b/gcc/ada/makeutl.ads
@@ -366,7 +366,8 @@ package Makeutl is
-- project from all the aggregated projects).
procedure Complete_Mains
- (Root_Project : Project_Id;
+ (Flags : Processing_Flags;
+ Root_Project : Project_Id;
Project_Tree : Project_Tree_Ref);
-- If some main units were already added from the command line, check
-- that they all belong to the root project, and that they are full
diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb
index 98d66d3..4e1e433 100644
--- a/gcc/ada/par_sco.adb
+++ b/gcc/ada/par_sco.adb
@@ -467,6 +467,7 @@ package body Par_SCO is
Loc := Sloc (Parent (Parent (N)));
if T = 'P' then
+
-- Record sloc of pragma (pragmas don't nest)
pragma Assert (Pragma_Sloc = No_Location);
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 2f531c9..743b2b6 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -7165,7 +7165,7 @@ package body Prj.Nmsc is
Display_File_Name : File_Name_Type;
begin
- Debug_Increase_Indent ("Looking for sources");
+ Debug_Increase_Indent ("Looking for sources of", Project.Project.Name);
-- Loop through subdirectories
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 3e653a7..7e77eb5 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -4035,8 +4035,9 @@ package body Sem_Attr is
-- Check in postcondition of function
Prag := N;
- while not Nkind_In (Prag, N_Pragma, N_Function_Specification,
- N_Subprogram_Body)
+ while not Nkind_In (Prag, N_Pragma,
+ N_Function_Specification,
+ N_Subprogram_Body)
loop
Prag := Parent (Prag);
end loop;
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 53608c6..249e4bf 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -6710,11 +6710,11 @@ package body Sem_Prag is
-- cause insertion of actions that would escape the attempt to
-- suppress the check code.
- -- Note that the Sloc for the IF statement corresponds to the
+ -- Note that the Sloc for the if statement corresponds to the
-- argument condition, not the pragma itself. The reason for this
-- is that we may generate a warning if the condition is False at
-- compile time, and we do not want to delete this warning when we
- -- delete the IF statement.
+ -- delete the if statement.
Expr := Get_Pragma_Arg (Arg2);
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 5d22fb1..d5b2640 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -12478,8 +12478,8 @@ package body Sem_Util is
----------------
procedure Wrong_Type (Expr : Node_Id; Expected_Type : Entity_Id) is
- Found_Type : constant Entity_Id := First_Subtype (Etype (Expr));
- Expec_Type : constant Entity_Id := First_Subtype (Expected_Type);
+ Found_Type : constant Entity_Id := First_Subtype (Etype (Expr));
+ Expec_Type : constant Entity_Id := First_Subtype (Expected_Type);
Matching_Field : Entity_Id;
-- Entity to give a more precise suggestion on how to write a one-
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index d859b75..1fdaae8 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -719,9 +719,9 @@ package Sinfo is
-- Corresponding_Body (Node5-Sem)
-- This field is set in subprogram declarations, package declarations,
- -- entry declarations of protected types, and in generic units. It
- -- points to the defining entity for the corresponding body (NOT the
- -- node for the body itself).
+ -- entry declarations of protected types, and in generic units. It points
+ -- to the defining entity for the corresponding body (NOT the node for
+ -- the body itself).
-- Corresponding_Formal_Spec (Node3-Sem)
-- This field is set in subprogram renaming declarations, where it points