Daily bump.
[official-gcc.git] / gcc / ada / comperr.ads
bloba55a49fb5c30ef1fe7b2b0fe5d96c7f09f3786e7
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- C O M P E R R --
6 -- --
7 -- S p e c --
8 -- --
9 -- $Revision: 1.18 $
10 -- --
11 -- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
12 -- --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
23 -- --
24 -- GNAT was originally developed by the GNAT team at New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
26 -- --
27 ------------------------------------------------------------------------------
29 -- This package contains the routine called when a fatal internal compiler
30 -- error is detected. Calls to this routines cause termination of the
31 -- current compilation with appropriate error output.
33 package Comperr is
35 procedure Compiler_Abort
36 (X : String;
37 Code : Integer := 0);
38 -- Signals an internal compiler error. Never returns control. Depending
39 -- on processing may end up raising Unrecoverable_Error, or exiting
40 -- directly. The message output is a "bug box" containing the
41 -- string passed as an argument. The node in Current_Error_Node is used
42 -- to provide the location where the error should be signalled. The
43 -- message includes the node id, and the code parameter if it is positive.
44 -- Note that this is only used at the outer level (to handle constraint
45 -- errors or assert errors etc.) In the normal logic of the compiler we
46 -- always use pragma Assert to check for errors, and if necessary an
47 -- explicit abort is achieved by pragma Assert (False). Code is positive
48 -- for a gigi abort (giving the gigi abort code), zero for a front
49 -- end exception (with possible message stored in TSD.Current_Excep,
50 -- and negative (an unused value) for a GCC abort.
52 ------------------------------
53 -- Use of gnat_bug.box File --
54 ------------------------------
56 -- When comperr generates the "bug box". The first two lines contain
57 -- information on the version number, type of abort, and source location.
59 -- Normally the remaining text is one of the following two forms
60 -- depending on the version number (p identifies public versions):
62 -- Please submit bug report by email to report@gnat.com.
63 -- Use a subject line meaningful to you and us to track the bug.
64 -- (include your customer number #nnn in the subject line).
65 -- Include the entire contents of this bug box in the report.
66 -- Include the exact gcc or gnatmake command that you entered.
67 -- Also include sources listed below in gnatchop format
68 -- (concatenated together with no headers between files).
69 -- (use plain ASCII or MIME attachment,
70 -- or FTP to your customer directory).
71 -- See README.GNATPRO for full info on procedure for submitting bugs.
73 -- or (public version case)
75 -- Please submit bug report by email to report@gnat.com.
76 -- Use a subject line meaningful to you and us to track the bug.
77 -- (include your customer number #nnn in the subject line).
78 -- Include the entire contents of this bug box in the report.
79 -- Include the exact gcc or gnatmake command that you entered.
80 -- Also include sources listed below in gnatchop format
81 -- (concatenated together with no headers between files).
82 -- See gnatinfo.txt for full info on procedure for submitting bugs.
84 -- However, an alternative mechanism exists for easily substituting
85 -- different text for this message. Compiler_Abort checks for the
86 -- existence of the file "gnat_bug.box" in the current source path.
87 -- Most typically this file, if present, will be in the directory
88 -- containing the run-time sources.
90 -- If this file is present, then it is a plain ASCII file, whose
91 -- contents replace the above quoted paragraphs. The lines in this
92 -- file should be 72 characters or less to avoid misformatting the
93 -- right boundary of the box. Note that the file does not contain
94 -- the vertical bar characters or any leading spaces in lines.
96 end Comperr;