annotate gcc/ada/comperr.ads @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- C O M P E R R --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
111
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
kono
parents:
diff changeset
17 -- for more details. You should have received a copy of the GNU General --
kono
parents:
diff changeset
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
kono
parents:
diff changeset
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
kono
parents:
diff changeset
20 -- --
kono
parents:
diff changeset
21 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
23 -- --
kono
parents:
diff changeset
24 ------------------------------------------------------------------------------
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 -- This package contains the routine called when a fatal internal compiler
kono
parents:
diff changeset
27 -- error is detected. Calls to this routines cause termination of the
kono
parents:
diff changeset
28 -- current compilation with appropriate error output.
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 package Comperr is
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 procedure Compiler_Abort
kono
parents:
diff changeset
33 (X : String;
kono
parents:
diff changeset
34 Fallback_Loc : String := "";
kono
parents:
diff changeset
35 From_GCC : Boolean := False);
kono
parents:
diff changeset
36 pragma No_Return (Compiler_Abort);
kono
parents:
diff changeset
37 -- Signals an internal compiler error. Never returns control. Depending on
kono
parents:
diff changeset
38 -- processing may end up raising Unrecoverable_Error, or exiting directly.
kono
parents:
diff changeset
39 -- The message output is a "bug box" containing the first string passed as
kono
parents:
diff changeset
40 -- an argument. The Sloc field of the node in Current_Error_Node is used to
kono
parents:
diff changeset
41 -- provide the location where the error should be signalled. If this Sloc
kono
parents:
diff changeset
42 -- value is set to No_Location or any of the other special location values,
kono
parents:
diff changeset
43 -- then the Fallback_Loc argument string is used instead. The message text
kono
parents:
diff changeset
44 -- includes the node id, and the code parameter if it is positive.
kono
parents:
diff changeset
45 --
kono
parents:
diff changeset
46 -- Note that this is only used at the outer level (to handle constraint
kono
parents:
diff changeset
47 -- errors or assert errors etc.) In the normal logic of the compiler we
kono
parents:
diff changeset
48 -- always use pragma Assert to check for errors, and if necessary an
kono
parents:
diff changeset
49 -- explicit abort is achieved by pragma Assert (False). From_GCC is true
kono
parents:
diff changeset
50 -- for a GCC abort and false for a front end exception (with a possible
kono
parents:
diff changeset
51 -- message stored in TSD.Current_Excep).
kono
parents:
diff changeset
52
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
53 -- WARNING: There is a matching C declaration of this subprogram in fe.h
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
54
111
kono
parents:
diff changeset
55 procedure Delete_SCIL_Files;
kono
parents:
diff changeset
56 -- Delete SCIL files associated with the main unit
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 ------------------------------
kono
parents:
diff changeset
59 -- Use of gnat_bug.box File --
kono
parents:
diff changeset
60 ------------------------------
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 -- When comperr generates the "bug box". The first two lines contain
kono
parents:
diff changeset
63 -- information on the version number, type of abort, and source location.
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 -- Normally the remaining text is one of three possible forms
kono
parents:
diff changeset
66 -- depending on Gnatvsn.Gnat_Version_Type (FSF, Public, GNATPRO).
kono
parents:
diff changeset
67 -- See body of this package for the exact text used.
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 -- In addition, an alternative mechanism exists for easily substituting
kono
parents:
diff changeset
70 -- different text for this message. Compiler_Abort checks for the
kono
parents:
diff changeset
71 -- existence of the file "gnat_bug.box" in the current source path.
kono
parents:
diff changeset
72 -- Most typically this file, if present, will be in the directory
kono
parents:
diff changeset
73 -- containing the run-time sources.
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 -- If this file is present, then it is a plain ASCII file, whose contents
kono
parents:
diff changeset
76 -- replace the remaining text. The lines in this file should be seventy-two
kono
parents:
diff changeset
77 -- characters or less to avoid misformatting the right boundary of the box.
kono
parents:
diff changeset
78 -- Note that the file does not contain the vertical bar characters or any
kono
parents:
diff changeset
79 -- leading spaces in lines.
kono
parents:
diff changeset
80
kono
parents:
diff changeset
81 end Comperr;