* c-decl.c (duplicate_decls): Conditionalize DECL_SAVED_TREE copy.
[official-gcc.git] / gcc / ada / binderr.ads
blob37a346f095f2adc727f6d420d0914507d5a7f281
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- B I N D E R R --
6 -- --
7 -- S p e c --
8 -- --
9 -- $Revision: 1.13 $
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 routines to output error messages for the binder
30 -- and also the routines for handling fatal error conditions in the binder.
32 with Types; use Types;
34 package Binderr is
36 Errors_Detected : Int;
37 -- Number of errors detected so far
39 Warnings_Detected : Int;
40 -- Number of warnings detected
42 Info_Prefix_Suppress : Boolean := False;
43 -- If set to True, the normal "info: " header before messages generated
44 -- by Error_Msg_Info will be omitted.
46 ---------------------------------------------------------
47 -- Error Message Text and Message Insertion Characters --
48 ---------------------------------------------------------
50 -- Error message text strings are composed of letters, digits and the
51 -- special characters space, comma, period, colon and semicolon,
52 -- apostrophe and parentheses. Special insertion characters can also
53 -- appear which cause the error message circuit to modify the given
54 -- string as follows:
56 -- Insertion character % (Percent: insert file name from Names table)
57 -- The character % is replaced by the text for the file name specified
58 -- by the Name_Id value stored in Error_Msg_Name_1. The name is always
59 -- enclosed in quotes. A second % may appear in a single message in
60 -- which case it is similarly replaced by the name which is specified
61 -- by the Name_Id value stored in Error_Msg_Name_2.
63 -- Insertion character & (Ampersand: insert unit name from Names table)
64 -- The character & is replaced by the text for the unit name specified
65 -- by the Name_Id value stored in Error_Msg_Name_1. The name is always
66 -- enclosed in quotes. A second & may appear in a single message in
67 -- which case it is similarly replaced by the name which is specified
68 -- by the Name_Id value stored in Error_Msg_Name_2.
70 -- Insertion character ? (Question mark: warning message)
71 -- The character ?, which must be the first character in the message
72 -- string, signals a warning message instead of an error message.
74 -----------------------------------------------------
75 -- Global Values Used for Error Message Insertions --
76 -----------------------------------------------------
78 -- The following global variables are essentially additional parameters
79 -- passed to the error message routine for insertion sequences described
80 -- above. The reason these are passed globally is that the insertion
81 -- mechanism is essentially an untyped one in which the appropriate
82 -- variables are set dependingon the specific insertion characters used.
84 Error_Msg_Name_1 : Name_Id;
85 Error_Msg_Name_2 : Name_Id;
86 -- Name_Id values for % insertion characters in message
88 ------------------------------
89 -- Error Output Subprograms --
90 ------------------------------
92 procedure Error_Msg (Msg : String);
93 -- Output specified error message to standard error or standard output
94 -- as governed by the brief and verbose switches, and update error
95 -- counts appropriately
97 procedure Error_Msg_Info (Msg : String);
98 -- Output information line. Indentical in effect to Error_Msg, except
99 -- that the prefix is info: instead of error: and the error count is
100 -- not incremented. The prefix may be suppressed by setting the global
101 -- variable Info_Prefix_Suppress to True.
103 procedure Error_Msg_Output (Msg : String; Info : Boolean);
104 -- Output given message, with insertions, to current message output file.
105 -- The second argument is True for an info message, false for a normal
106 -- warning or error message. Normally this is not called directly, but
107 -- rather only by Error_Msg or Error_Msg_Info. It is called directly
108 -- when the caller must control whether the output goes to stderr or
109 -- stdout (Error_Msg_Output always goes to the current output file).
111 procedure Finalize_Binderr;
112 -- Finalize error output for one file
114 procedure Initialize_Binderr;
115 -- Initialize error output for one file
117 end Binderr;