OSDN Git Service

2003-12-11 Ed Falis <falis@gnat.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / comperr.adb
index 2f96b44..69302f7 100644 (file)
@@ -6,8 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                                                                          --
---          Copyright (C) 1992-2001 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -21,7 +20,7 @@
 -- MA 02111-1307, USA.                                                      --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
--- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
 --                                                                          --
 ------------------------------------------------------------------------------
 
@@ -81,12 +80,6 @@ package body Comperr is
       --  the FSF version of GNAT, but there are specializations for
       --  the GNATPRO and Public releases by Ada Core Technologies.
 
-      Public_Version  : constant Boolean := Gnat_Version_Type = "PUBLIC ";
-      --  Set True for the public version of GNAT
-
-      GNATPRO_Version : constant Boolean := Gnat_Version_Type = "GNATPRO";
-      --  Set True for the GNATPRO version of GNAT
-
       procedure End_Line;
       --  Add blanks up to column 76, and then a final vertical bar
 
@@ -100,6 +93,9 @@ package body Comperr is
          Write_Eol;
       end End_Line;
 
+      Is_Public_Version : constant Boolean := Get_Gnat_Build_Type = Public;
+      Is_FSF_Version    : constant Boolean := Get_Gnat_Build_Type = FSF;
+
    --  Start of processing for Compiler_Abort
 
    begin
@@ -117,7 +113,7 @@ package body Comperr is
 
       --  Debug flag K disables this behavior (useful for debugging)
 
-      if Total_Errors_Detected /= 0 and then not Debug_Flag_K then
+      if Serious_Errors_Detected /= 0 and then not Debug_Flag_K then
          Errout.Finalize;
 
          Set_Standard_Error;
@@ -265,25 +261,25 @@ package body Comperr is
             --  Otherwise we use the standard fixed text
 
             else
-               if Public_Version or GNATPRO_Version then
+               if Is_FSF_Version then
                   Write_Str
-                    ("| Please submit bug report by email " &
-                     "to report@gnat.com.");
+                    ("| Please submit a bug report; see" &
+                     " http://gcc.gnu.org/bugs.html.");
                   End_Line;
 
                else
                   Write_Str
                     ("| Please submit bug report by email " &
-                    "to gcc-bugs@gcc.gnu.org.");
+                     "to report@gnat.com.");
                   End_Line;
-               end if;
 
-               Write_Str
-                 ("| Use a subject line meaningful to you" &
-                  " and us to track the bug.");
-               End_Line;
+                  Write_Str
+                    ("| Use a subject line meaningful to you" &
+                     " and us to track the bug.");
+                  End_Line;
+               end if;
 
-               if GNATPRO_Version then
+               if not (Is_Public_Version or Is_FSF_Version) then
                   Write_Str
                     ("| (include your customer number #nnn " &
                      "in the subject line).");
@@ -308,7 +304,7 @@ package body Comperr is
                  ("| (concatenated together with no headers between files).");
                End_Line;
 
-               if not GNATPRO_Version then
+               if Is_Public_Version then
                   Write_Str
                     ("| (use plain ASCII or MIME attachment).");
                   End_Line;
@@ -318,7 +314,7 @@ package body Comperr is
                      "for submitting bugs.");
                   End_Line;
 
-               else
+               elsif not Is_FSF_Version then
                   Write_Str
                     ("| (use plain ASCII or MIME attachment, or FTP "
                      & "to your customer directory).");
@@ -348,6 +344,9 @@ package body Comperr is
          Write_Eol;
 
          Write_Line ("Please include these source files with error report");
+         Write_Line ("Note that list may not be accurate in some cases, ");
+         Write_Line ("so please double check that the problem can still ");
+         Write_Line ("be reproduced with the set of files listed.");
          Write_Eol;
 
          for U in Main_Unit .. Last_Unit loop