aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 12:28:52 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 12:28:52 +0200
commitb330e3c8662dc2a2214d96f15c66ae7b42dfdecd (patch)
treed53a7b3cb0229c34ad3390076ccda3352e4be6ac /gcc
parent24de083ff5a0b613356e4ad95c501fe9a9f795e1 (diff)
downloadgcc-b330e3c8662dc2a2214d96f15c66ae7b42dfdecd.zip
gcc-b330e3c8662dc2a2214d96f15c66ae7b42dfdecd.tar.gz
gcc-b330e3c8662dc2a2214d96f15c66ae7b42dfdecd.tar.bz2
[multiple changes]
2014-08-01 Robert Dewar <dewar@adacore.com> * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_res.adb: Minor reformatting. 2014-08-01 Vincent Celier <celier@adacore.com> * make.adb (Initialize): Set Keep_Temporary_Files to True when -dn is specified. * makeusg.adb: Add line for new switch --keep-temp-files. * makeutl.ads (Keep_Temp_Files_Option): New constant String. * opt.ads (Keep_Temporary_Files): Document that it is also used by gnatmake and gprbuild. * switch-m.adb: Recognize new switch --keep-temp-files. From-SVN: r213451
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog15
-rw-r--r--gcc/ada/debug.adb2
-rw-r--r--gcc/ada/make.adb11
-rw-r--r--gcc/ada/makeusg.adb9
-rw-r--r--gcc/ada/makeutl.ads4
-rw-r--r--gcc/ada/opt.ads6
-rw-r--r--gcc/ada/prj.adb7
-rw-r--r--gcc/ada/sem_aggr.adb10
-rw-r--r--gcc/ada/sem_ch3.adb2
-rw-r--r--gcc/ada/sem_ch5.adb6
-rw-r--r--gcc/ada/sem_res.adb3
-rw-r--r--gcc/ada/sem_util.adb1
-rw-r--r--gcc/ada/switch-m.adb3
13 files changed, 51 insertions, 28 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index f39e478..a147c91 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,18 @@
+2014-08-01 Robert Dewar <dewar@adacore.com>
+
+ * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
+ sem_res.adb: Minor reformatting.
+
+2014-08-01 Vincent Celier <celier@adacore.com>
+
+ * make.adb (Initialize): Set Keep_Temporary_Files to True when
+ -dn is specified.
+ * makeusg.adb: Add line for new switch --keep-temp-files.
+ * makeutl.ads (Keep_Temp_Files_Option): New constant String.
+ * opt.ads (Keep_Temporary_Files): Document that it is also used
+ by gnatmake and gprbuild.
+ * switch-m.adb: Recognize new switch --keep-temp-files.
+
2014-08-01 Tristan Gingold <gingold@adacore.com>
* sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb
index 94da8ec..e2ab02e 100644
--- a/gcc/ada/debug.adb
+++ b/gcc/ada/debug.adb
@@ -789,6 +789,7 @@ package body Debug is
-- dm Issue a message indicating the maximum number of simultaneous
-- compilations.
+ -- Equivalent to --keep-temp-files.
-- dn Do not delete temporary files created by gnatmake at the end
-- of execution, such as temporary config pragma files, mapping
@@ -796,6 +797,7 @@ package body Debug is
-- dp Prints the Q used by routine Make.Compile_Sources every time
-- we go around the main compile loop of Make.Compile_Sources
+ -- Equivalent to --keep-temp-files.
-- dq Prints source files as they are enqueued and dequeued in the Q
-- used by routine Make.Compile_Sources. Useful to figure out the
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index 3ae8f27..e4dc750 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -3788,7 +3788,7 @@ package body Make is
-- Delete any temporary configuration pragma file
- if not Debug.Debug_Flag_N then
+ if not Keep_Temporary_Files then
Delete_Temp_Config_Files (Project_Tree);
end if;
end Compile_Sources;
@@ -3966,7 +3966,7 @@ package body Make is
-- created when using a project file.
if Main_Project = No_Project
- or else Debug.Debug_Flag_N
+ or else Opt.Keep_Temporary_Files
or else Args (J)'Length < 8
or else
Args (J) (Args (J)'First .. Args (J)'First + 6) /= "-gnatem"
@@ -3977,7 +3977,7 @@ package body Make is
-- Reset Temporary_Config_File to False so that the eventual
-- other -gnatec switches will be displayed.
- if (not Debug.Debug_Flag_N)
+ if (not Opt.Keep_Temporary_Files)
and then Temporary_Config_File
and then Args (J)'Length > 7
and then Args (J) (Args (J)'First .. Args (J)'First + 6)
@@ -3988,7 +3988,7 @@ package body Make is
-- Do not display the -F=mapping_file switch for gnatbind
-- if -dn is not specified.
- elsif Debug.Debug_Flag_N
+ elsif Opt.Keep_Temporary_Files
or else Args (J)'Length < 4
or else
Args (J) (Args (J)'First .. Args (J)'First + 2) /= "-F="
@@ -6650,6 +6650,9 @@ package body Make is
Project_Of_Current_Object_Directory := No_Project;
+ if Debug.Debug_Flag_N then
+ Opt.Keep_Temporary_Files := True;
+ end if;
end Initialize;
----------------------------
diff --git a/gcc/ada/makeusg.adb b/gcc/ada/makeusg.adb
index 3c708bf..580a373 100644
--- a/gcc/ada/makeusg.adb
+++ b/gcc/ada/makeusg.adb
@@ -257,12 +257,6 @@ begin
Write_Eol;
Write_Eol;
- -- Line for -dn
-
- Write_Str (" -dn Do not delete temporary files");
- Write_Eol;
- Write_Eol;
-
Write_Str (" --create-map-file Create map file mainprog.map");
Write_Eol;
@@ -271,6 +265,9 @@ begin
Write_Str (" Create map file mapfile");
Write_Eol;
+ Write_Str (" --keep-temp-files Keep temporary files");
+ Write_Eol;
+
Write_Str (" --GCC=command Use this gcc command");
Write_Eol;
diff --git a/gcc/ada/makeutl.ads b/gcc/ada/makeutl.ads
index e946df6..9abd97f 100644
--- a/gcc/ada/makeutl.ads
+++ b/gcc/ada/makeutl.ads
@@ -85,6 +85,10 @@ package Makeutl is
-- the builder and does not want to pollute its output with error messages
-- coming from the builder. This is an internal switch.
+ Keep_Temp_Files_Option : constant String := "--keep-temp-files";
+ -- Switch to suppress deletion of temp files created by the builder.
+ -- Equivallent of -dn.
+
Load_Standard_Base : Boolean := True;
-- False when gprbuild is called with --db-
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index 7993155..883e359 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -843,9 +843,9 @@ package Opt is
-- sources until there is no more work.
Keep_Temporary_Files : Boolean := False;
- -- GNATCMD
- -- When True the temporary files created by the GNAT driver are not
- -- deleted. Set by switch -dn or qualifier /KEEP_TEMPORARY_FILES.
+ -- GNATCMD, GNATMAKE, GPRBUILD
+ -- When True the temporary files are not deleted. Set by switches -dn or
+ -- --keep-temp-files.
Leap_Seconds_Support : Boolean := False;
-- GNATBIND
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index 6699c4f..3c4d115 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -23,7 +23,6 @@
-- --
------------------------------------------------------------------------------
-with Debug;
with Opt;
with Osint; use Osint;
with Output; use Output;
@@ -187,7 +186,7 @@ package body Prj is
pragma Warnings (Off, Dont_Care);
begin
- if not Debug.Debug_Flag_N then
+ if not Opt.Keep_Temporary_Files then
if Current_Verbosity = High then
Write_Line ("Removing temp file: " & Get_Name_String (Path));
end if;
@@ -217,7 +216,7 @@ package body Prj is
Proj : Project_List;
begin
- if not Debug.Debug_Flag_N then
+ if not Opt.Keep_Temporary_Files then
if Project_Tree /= null then
Proj := Project_Tree.Projects;
while Proj /= null loop
@@ -254,7 +253,7 @@ package body Prj is
Path : Path_Name_Type;
begin
- if not Debug.Debug_Flag_N then
+ if not Opt.Keep_Temporary_Files then
for Index in
1 .. Temp_Files_Table.Last (Shared.Private_Part.Temp_Files)
loop
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 5cc0f63..e5e236b 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -1728,12 +1728,14 @@ package body Sem_Aggr is
Freeze_Before (N, E);
if Has_Dynamic_Predicate_Aspect (E) then
- Error_Msg_NE ("subtype& has dynamic predicate,"
- & "not allowed in aggregate choice", Choice, E);
+ Error_Msg_NE
+ ("subtype& has dynamic predicate, not allowed "
+ & "in aggregate choice", Choice, E);
elsif not Is_Static_Subtype (E) then
- Error_Msg_NE ("non-static subtype& has predicate,"
- & "not allowed in aggregate choice", Choice, E);
+ Error_Msg_NE
+ ("non-static subtype& has predicate, not allowed "
+ & "in aggregate choice", Choice, E);
end if;
-- If the subtype has a static predicate, replace the
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 560eb03..dc09c449 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -2923,7 +2923,7 @@ package body Sem_Ch3 is
if Has_Dynamic_Predicate_Aspect (T) then
Error_Msg_N
("subtype has dynamic predicate, "
- & "not allowed in number declaration", N);
+ & "not allowed in number declaration", N);
end if;
else
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 37c8646..3d8d3f6 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -2210,9 +2210,9 @@ package body Sem_Ch5 is
or else Has_Dynamic_Predicate_Aspect (T))
then
Bad_Predicated_Subtype_Use
- ("cannot use subtype& with non-static predicate for loop " &
- "iteration", Discrete_Subtype_Definition (N),
- T, Suggest_Static => True);
+ ("cannot use subtype& with non-static predicate for loop "
+ & "iteration", Discrete_Subtype_Definition (N),
+ T, Suggest_Static => True);
elsif Inside_A_Generic and then Is_Generic_Formal (T) then
Set_No_Dynamic_Predicate_On_Actual (T);
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index c0d3638..d2d7188 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -9819,10 +9819,9 @@ package body Sem_Res is
begin
if Nkind (Drange) = N_Subtype_Indication
- and then Has_Predicates (Entity (Subtype_Mark (Drange)))
+ and then Has_Predicates (Entity (Subtype_Mark (Drange)))
then
Subt := Entity (Subtype_Mark (Drange));
-
else
Subt := Etype (Drange);
end if;
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 23c5fa7..6c385e0 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -784,7 +784,6 @@ package body Sem_Util is
Gen : Entity_Id;
begin
-
-- Avoid cascaded errors
if Error_Posted (N) then
diff --git a/gcc/ada/switch-m.adb b/gcc/ada/switch-m.adb
index aba2223..c52ca42 100644
--- a/gcc/ada/switch-m.adb
+++ b/gcc/ada/switch-m.adb
@@ -793,6 +793,9 @@ package body Switch.M is
elsif Switch_Chars = Makeutl.No_Exit_Message_Option then
Opt.No_Exit_Message := True;
+ elsif Switch_Chars = Makeutl.Keep_Temp_Files_Option then
+ Opt.Keep_Temporary_Files := True;
+
elsif Switch_Chars (Ptr) = '-' then
Bad_Switch (Switch_Chars);