annotate gcc/ada/comperr.ads @ 118:fd00160c1b76

ifdef TARGET_64BIT
author mir3636
date Tue, 27 Feb 2018 15:01:35 +0900
parents 04ced10e8804
children 84e7813d76e9
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 -- --
kono
parents:
diff changeset
9 -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
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
kono
parents:
diff changeset
53 procedure Delete_SCIL_Files;
kono
parents:
diff changeset
54 -- Delete SCIL files associated with the main unit
kono
parents:
diff changeset
55
kono
parents:
diff changeset
56 ------------------------------
kono
parents:
diff changeset
57 -- Use of gnat_bug.box File --
kono
parents:
diff changeset
58 ------------------------------
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 -- When comperr generates the "bug box". The first two lines contain
kono
parents:
diff changeset
61 -- information on the version number, type of abort, and source location.
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 -- Normally the remaining text is one of three possible forms
kono
parents:
diff changeset
64 -- depending on Gnatvsn.Gnat_Version_Type (FSF, Public, GNATPRO).
kono
parents:
diff changeset
65 -- See body of this package for the exact text used.
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 -- In addition, an alternative mechanism exists for easily substituting
kono
parents:
diff changeset
68 -- different text for this message. Compiler_Abort checks for the
kono
parents:
diff changeset
69 -- existence of the file "gnat_bug.box" in the current source path.
kono
parents:
diff changeset
70 -- Most typically this file, if present, will be in the directory
kono
parents:
diff changeset
71 -- containing the run-time sources.
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 -- If this file is present, then it is a plain ASCII file, whose contents
kono
parents:
diff changeset
74 -- replace the remaining text. The lines in this file should be seventy-two
kono
parents:
diff changeset
75 -- characters or less to avoid misformatting the right boundary of the box.
kono
parents:
diff changeset
76 -- Note that the file does not contain the vertical bar characters or any
kono
parents:
diff changeset
77 -- leading spaces in lines.
kono
parents:
diff changeset
78
kono
parents:
diff changeset
79 end Comperr;