]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/m2/mc-boot/Gkeyc.h
Update copyright years.
[thirdparty/gcc.git] / gcc / m2 / mc-boot / Gkeyc.h
1 /* do not edit automatically generated by mc from keyc. */
2 /* keyc.def provides an interface to emitting symbols which.
3
4 Copyright (C) 2016-2024 Free Software Foundation, Inc.
5 Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
6
7 This file is part of GNU Modula-2.
8
9 GNU Modula-2 is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
12 any later version.
13
14 GNU Modula-2 is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with GNU Modula-2; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
22
23
24 #if !defined (_keyc_H)
25 # define _keyc_H
26
27 #include "config.h"
28 #include "system.h"
29 # ifdef __cplusplus
30 extern "C" {
31 # endif
32 #include <stdbool.h>
33 # if !defined (PROC_D)
34 # define PROC_D
35 typedef void (*PROC_t) (void);
36 typedef struct { PROC_t proc; } PROC;
37 # endif
38
39 # include "GmcPretty.h"
40 # include "GDynamicStrings.h"
41 # include "Gdecl.h"
42 # include "GnameKey.h"
43
44 # if defined (_keyc_C)
45 # define EXTERN
46 # else
47 # define EXTERN extern
48 # endif
49
50
51 /*
52 useUnistd - need to use unistd.h call using open/close/read/write require this header.
53 */
54
55 EXTERN void keyc_useUnistd (void);
56
57 /*
58 useThrow - use the throw function.
59 */
60
61 EXTERN void keyc_useThrow (void);
62
63 /*
64 useStorage - indicate we have used storage.
65 */
66
67 EXTERN void keyc_useStorage (void);
68
69 /*
70 useFree - indicate we have used free.
71 */
72
73 EXTERN void keyc_useFree (void);
74
75 /*
76 useMalloc - indicate we have used malloc.
77 */
78
79 EXTERN void keyc_useMalloc (void);
80
81 /*
82 useProc - indicate we have used proc.
83 */
84
85 EXTERN void keyc_useProc (void);
86
87 /*
88 useTrue - indicate we have used TRUE.
89 */
90
91 EXTERN void keyc_useTrue (void);
92
93 /*
94 useFalse - indicate we have used FALSE.
95 */
96
97 EXTERN void keyc_useFalse (void);
98
99 /*
100 useNull - indicate we have used NULL.
101 */
102
103 EXTERN void keyc_useNull (void);
104
105 /*
106 useMemcpy - indicate we have used memcpy.
107 */
108
109 EXTERN void keyc_useMemcpy (void);
110
111 /*
112 useIntMin - indicate we have used INT_MIN.
113 */
114
115 EXTERN void keyc_useIntMin (void);
116
117 /*
118 useUIntMin - indicate we have used UINT_MIN.
119 */
120
121 EXTERN void keyc_useUIntMin (void);
122
123 /*
124 useLongMin - indicate we have used LONG_MIN.
125 */
126
127 EXTERN void keyc_useLongMin (void);
128
129 /*
130 useULongMin - indicate we have used ULONG_MIN.
131 */
132
133 EXTERN void keyc_useULongMin (void);
134
135 /*
136 useCharMin - indicate we have used CHAR_MIN.
137 */
138
139 EXTERN void keyc_useCharMin (void);
140
141 /*
142 useUCharMin - indicate we have used UCHAR_MIN.
143 */
144
145 EXTERN void keyc_useUCharMin (void);
146
147 /*
148 useIntMax - indicate we have used INT_MAX.
149 */
150
151 EXTERN void keyc_useIntMax (void);
152
153 /*
154 useUIntMax - indicate we have used UINT_MAX.
155 */
156
157 EXTERN void keyc_useUIntMax (void);
158
159 /*
160 useLongMax - indicate we have used LONG_MAX.
161 */
162
163 EXTERN void keyc_useLongMax (void);
164
165 /*
166 useULongMax - indicate we have used ULONG_MAX.
167 */
168
169 EXTERN void keyc_useULongMax (void);
170
171 /*
172 useCharMax - indicate we have used CHAR_MAX.
173 */
174
175 EXTERN void keyc_useCharMax (void);
176
177 /*
178 useUCharMax - indicate we have used UChar_MAX.
179 */
180
181 EXTERN void keyc_useUCharMax (void);
182
183 /*
184 useSize_t - indicate we have used size_t.
185 */
186
187 EXTERN void keyc_useSize_t (void);
188
189 /*
190 useSSize_t - indicate we have used ssize_t.
191 */
192
193 EXTERN void keyc_useSSize_t (void);
194
195 /*
196 useLabs - indicate we have used labs.
197 */
198
199 EXTERN void keyc_useLabs (void);
200
201 /*
202 useAbs - indicate we have used abs.
203 */
204
205 EXTERN void keyc_useAbs (void);
206
207 /*
208 useFabs - indicate we have used fabs.
209 */
210
211 EXTERN void keyc_useFabs (void);
212
213 /*
214 useFabsl - indicate we have used fabsl.
215 */
216
217 EXTERN void keyc_useFabsl (void);
218
219 /*
220 useException - use the exceptions module, mcrts.
221 */
222
223 EXTERN void keyc_useException (void);
224
225 /*
226 useComplex - use the complex data type.
227 */
228
229 EXTERN void keyc_useComplex (void);
230
231 /*
232 useM2RTS - indicate we have used M2RTS in the converted code.
233 */
234
235 EXTERN void keyc_useM2RTS (void);
236
237 /*
238 useStrlen - indicate we have used strlen in the converted code.
239 */
240
241 EXTERN void keyc_useStrlen (void);
242
243 /*
244 useCtype - indicate we have used the toupper function.
245 */
246
247 EXTERN void keyc_useCtype (void);
248
249 /*
250 genDefs - generate definitions or includes for all
251 macros and prototypes used.
252 */
253
254 EXTERN void keyc_genDefs (mcPretty_pretty p);
255
256 /*
257 genConfigSystem - generate include files for config.h and system.h
258 within the GCC framework.
259 */
260
261 EXTERN void keyc_genConfigSystem (mcPretty_pretty p);
262
263 /*
264 enterScope - enter a scope defined by, n.
265 */
266
267 EXTERN void keyc_enterScope (decl_node n);
268
269 /*
270 leaveScope - leave the scope defined by, n.
271 */
272
273 EXTERN void keyc_leaveScope (decl_node n);
274
275 /*
276 cname - attempts to declare a symbol with name, n, in the
277 current scope. If there is no conflict with the
278 target language then NIL is returned, otherwise
279 a mangled name is returned as a String.
280 If scopes is FALSE then only the keywords and
281 macros are detected for a clash (all scoping
282 is ignored).
283 */
284
285 EXTERN DynamicStrings_String keyc_cname (nameKey_Name n, bool scopes);
286
287 /*
288 cnamen - attempts to declare a symbol with name, n, in the
289 current scope. If there is no conflict with the
290 target language then NIL is returned, otherwise
291 a mangled name is returned as a Name
292 If scopes is FALSE then only the keywords and
293 macros are detected for a clash (all scoping
294 is ignored).
295 */
296
297 EXTERN nameKey_Name keyc_cnamen (nameKey_Name n, bool scopes);
298
299 /*
300 cp - include C++ keywords and standard declarations to avoid.
301 */
302
303 EXTERN void keyc_cp (void);
304 # ifdef __cplusplus
305 }
306 # endif
307
308 # undef EXTERN
309 #endif