aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-23 08:35:36 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-23 08:35:36 +0200
commit3aee21ef61bb90e6806563e326837316023185e8 (patch)
treec390de6133d0d7541fb7139978107479e9ba4724
parent5b599df4d10201f3a83dbbaece526a2a22b49f18 (diff)
downloadgcc-3aee21ef61bb90e6806563e326837316023185e8.zip
gcc-3aee21ef61bb90e6806563e326837316023185e8.tar.gz
gcc-3aee21ef61bb90e6806563e326837316023185e8.tar.bz2
[multiple changes]
2010-06-23 Emmanuel Briot <briot@adacore.com> * prj.adb, prj.ads, prj-nmsc.adb (Processing_Flags): New flag Missing_Source_Files. 2010-06-23 Robert Dewar <dewar@adacore.com> * exp_ch3.adb, exp_util.adb: Minor reformatting. From-SVN: r161249
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/exp_ch3.adb16
-rw-r--r--gcc/ada/exp_util.adb2
-rw-r--r--gcc/ada/prj-nmsc.adb45
-rw-r--r--gcc/ada/prj.adb6
-rw-r--r--gcc/ada/prj.ads25
6 files changed, 70 insertions, 33 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index edecef6..79848dd 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2010-06-23 Emmanuel Briot <briot@adacore.com>
+
+ * prj.adb, prj.ads, prj-nmsc.adb (Processing_Flags): New flag
+ Missing_Source_Files.
+
+2010-06-23 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch3.adb, exp_util.adb: Minor reformatting.
+
2010-06-23 Jose Ruiz <ruiz@adacore.com>
* a-reatim.adb, a-retide.adb: Move the initialization of the tasking
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index e3b48d4..9326406 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -5927,8 +5927,8 @@ package body Exp_Ch3 is
and then Has_Discriminants (Def_Id)
then
declare
- Ctyp : constant Entity_Id :=
- Corresponding_Concurrent_Type (Def_Id);
+ Ctyp : constant Entity_Id :=
+ Corresponding_Concurrent_Type (Def_Id);
Conc_Discr : Entity_Id;
Rec_Discr : Entity_Id;
Temp : Entity_Id;
@@ -5936,7 +5936,6 @@ package body Exp_Ch3 is
begin
Conc_Discr := First_Discriminant (Ctyp);
Rec_Discr := First_Discriminant (Def_Id);
-
while Present (Conc_Discr) loop
Temp := Discriminal (Conc_Discr);
Set_Discriminal (Conc_Discr, Discriminal (Rec_Discr));
@@ -7821,12 +7820,11 @@ package body Exp_Ch3 is
-- If a primitive is encountered that renames the predefined
-- equality operator before reaching any explicit equality
- -- primitive, then we still need to create a predefined
- -- equality function, because calls to it can occur via
- -- the renaming. A new name is created for the equality
- -- to avoid conflicting with any user-defined equality.
- -- (Note that this doesn't account for renamings of
- -- equality nested within subpackages???)
+ -- primitive, then we still need to create a predefined equality
+ -- function, because calls to it can occur via the renaming. A new
+ -- name is created for the equality to avoid conflicting with any
+ -- user-defined equality. (Note that this doesn't account for
+ -- renamings of equality nested within subpackages???)
if Is_Predefined_Eq_Renaming (Node (Prim)) then
Eq_Name := New_External_Name (Chars (Node (Prim)), 'E');
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 8d2f46c..61eef35 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -305,11 +305,9 @@ package body Exp_Util is
else
if No (Actions (Fnode)) then
Set_Actions (Fnode, L);
-
else
Append_List (L, Actions (Fnode));
end if;
-
end if;
end Append_Freeze_Actions;
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 6ea1daf..f6557f1 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -6537,19 +6537,40 @@ package body Prj.Nmsc is
if not NL.Found then
Err_Vars.Error_Msg_File_1 := NL.Name;
- if First_Error then
- Error_Msg
- (Data.Flags,
- "source file { not found",
- NL.Location, Project.Project);
- First_Error := False;
+ case Data.Flags.Missing_Source_Files is
+ when Error =>
+ if First_Error then
+ Error_Msg
+ (Data.Flags,
+ "source file { not found",
+ NL.Location, Project.Project);
+ First_Error := False;
- else
- Error_Msg
- (Data.Flags,
- "\source file { not found",
- NL.Location, Project.Project);
- end if;
+ else
+ Error_Msg
+ (Data.Flags,
+ "\source file { not found",
+ NL.Location, Project.Project);
+ end if;
+
+ when Warning =>
+ if First_Error then
+ Error_Msg
+ (Data.Flags,
+ "?source file { not found",
+ NL.Location, Project.Project);
+ First_Error := False;
+
+ else
+ Error_Msg
+ (Data.Flags,
+ "?\source file { not found",
+ NL.Location, Project.Project);
+ end if;
+
+ when Silent =>
+ null;
+ end case;
end if;
NL := Source_Names_Htable.Get_Next (Project.Source_Names);
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index fef53f8..be02a41 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -1230,7 +1230,8 @@ package body Prj is
Compiler_Driver_Mandatory : Boolean := False;
Error_On_Unknown_Language : Boolean := True;
Require_Obj_Dirs : Error_Warning := Error;
- Allow_Invalid_External : Error_Warning := Error)
+ Allow_Invalid_External : Error_Warning := Error;
+ Missing_Source_Files : Error_Warning := Error)
return Processing_Flags
is
begin
@@ -1242,7 +1243,8 @@ package body Prj is
Error_On_Unknown_Language => Error_On_Unknown_Language,
Compiler_Driver_Mandatory => Compiler_Driver_Mandatory,
Require_Obj_Dirs => Require_Obj_Dirs,
- Allow_Invalid_External => Allow_Invalid_External);
+ Allow_Invalid_External => Allow_Invalid_External,
+ Missing_Source_Files => Missing_Source_Files);
end Create_Flags;
------------
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index cba9c6f..0cb504a 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -1459,7 +1459,8 @@ package Prj is
Compiler_Driver_Mandatory : Boolean := False;
Error_On_Unknown_Language : Boolean := True;
Require_Obj_Dirs : Error_Warning := Error;
- Allow_Invalid_External : Error_Warning := Error)
+ Allow_Invalid_External : Error_Warning := Error;
+ Missing_Source_Files : Error_Warning := Error)
return Processing_Flags;
-- Function used to create Processing_Flags structure
--
@@ -1492,6 +1493,10 @@ package Prj is
-- If Allow_Invalid_External is Silent, then no error is reported when an
-- invalid value is used for an external variable (and it doesn't match its
-- type). Instead, the first possible value is used.
+ --
+ -- Missing_Source_Files indicates whether it is an error or a warning that
+ -- a source file mentioned in the Source_Files attributes is not actually
+ -- found in the source directories
Gprbuild_Flags : constant Processing_Flags;
Gprclean_Flags : constant Processing_Flags;
@@ -1521,6 +1526,10 @@ package Prj is
-- another program running on the same machine has recreated it.
-- Does nothing if Debug.Debug_Flag_N is set
+ Virtual_Prefix : constant String := "v$";
+ -- The prefix for virtual extending projects. Because of the '$', which is
+ -- normally forbidden for project names, there cannot be any name clash.
+
private
All_Packages : constant String_List_Access := null;
@@ -1535,10 +1544,6 @@ private
Location => No_Location,
Default => False);
- Virtual_Prefix : constant String := "v$";
- -- The prefix for virtual extending projects. Because of the '$', which is
- -- normally forbidden for project names, there cannot be any name clash.
-
type Source_Iterator is record
In_Tree : Project_Tree_Ref;
@@ -1601,6 +1606,7 @@ private
Error_On_Unknown_Language : Boolean;
Require_Obj_Dirs : Error_Warning;
Allow_Invalid_External : Error_Warning;
+ Missing_Source_Files : Error_Warning;
end record;
Gprbuild_Flags : constant Processing_Flags :=
@@ -1611,7 +1617,8 @@ private
Compiler_Driver_Mandatory => True,
Error_On_Unknown_Language => True,
Require_Obj_Dirs => Error,
- Allow_Invalid_External => Error);
+ Allow_Invalid_External => Error,
+ Missing_Source_Files => Error);
Gprclean_Flags : constant Processing_Flags :=
(Report_Error => null,
@@ -1621,7 +1628,8 @@ private
Compiler_Driver_Mandatory => True,
Error_On_Unknown_Language => True,
Require_Obj_Dirs => Warning,
- Allow_Invalid_External => Error);
+ Allow_Invalid_External => Error,
+ Missing_Source_Files => Warning);
Gnatmake_Flags : constant Processing_Flags :=
(Report_Error => null,
@@ -1631,6 +1639,7 @@ private
Compiler_Driver_Mandatory => False,
Error_On_Unknown_Language => False,
Require_Obj_Dirs => Error,
- Allow_Invalid_External => Error);
+ Allow_Invalid_External => Error,
+ Missing_Source_Files => Error);
end Prj;