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