]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 1 Aug 2014 10:28:52 +0000 (12:28 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 1 Aug 2014 10:28:52 +0000 (12:28 +0200)
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

13 files changed:
gcc/ada/ChangeLog
gcc/ada/debug.adb
gcc/ada/make.adb
gcc/ada/makeusg.adb
gcc/ada/makeutl.ads
gcc/ada/opt.ads
gcc/ada/prj.adb
gcc/ada/sem_aggr.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_ch5.adb
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/switch-m.adb

index f39e478e8e7058ecf9f37a08f9e37c792caffa69..a147c918cc6bc4485cd50f3313a2b98ff079ce6a 100644 (file)
@@ -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 ...
index 94da8ec7db841adabdbb6801995cc90922f51634..e2ab02e54dc4103f5cd1b7fe8a857047bf498ab1 100644 (file)
@@ -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
index 3ae8f272c67a319841ec7f580c0991d2c6beffda..e4dc750533e64988c228ff0a17aba0a8fa108894 100644 (file)
@@ -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;
 
    ----------------------------
index 3c708bf0eac329145d27e19805973ca04d738199..580a3730a9ee3aca2dc07eb4fd4dea27d433a257 100644 (file)
@@ -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;
 
index e946df6f759f6ac6ea8416f956eccc6271a49b31..9abd97ff161eb6cb5703e82f0cc6c2070a9881c9 100644 (file)
@@ -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-
 
index 7993155402e712c6095a1def2f315de7a04302bc..883e359d323d35929c0acf24cfb7bf13b41d1c72 100644 (file)
@@ -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
index 6699c4fd076b91732bf27ee0e3def83291227ccc..3c4d11592ef6623e9d25e0ba44a5a62adc2e5d8b 100644 (file)
@@ -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
index 5cc0f630e3a32368e96b3428bfc78bd1a9fc8f1c..e5e236bc3c2c844086a4a179ea547bef4989a10c 100644 (file)
@@ -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
index 560eb03875fbda4095aacf848dd2e702489742dc..dc09c449a8a4ec76e32e475cda33f66e3bd2d742 100644 (file)
@@ -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
index 37c864638c4dcf9c90469c24d3b718801f68e9d0..3d8d3f60b142a5ba548f51c8dc87d2a4128634ce 100644 (file)
@@ -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);
index c0d3638313e08eeb3f4fac95cec0473c1e026762..d2d7188e41eeede901bc1a36dc81d79d095da102 100644 (file)
@@ -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;
index 23c5fa7edb21618ca71b8378fbab61101a1c7754..6c385e0e7894f916a409db66589e4248f9e5e3dd 100644 (file)
@@ -784,7 +784,6 @@ package body Sem_Util is
       Gen            : Entity_Id;
 
    begin
-
       --  Avoid cascaded errors
 
       if Error_Posted (N) then
index aba22230522beca1935487eba80ddc7d736b1026..c52ca42478841356962514284031c3329953da92 100644 (file)
@@ -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);