]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
c0de361f | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003. |
885824d3 | 3 | ** See ../LICENSE for license information. |
4 | ** | |
5 | */ | |
6 | ||
7 | # ifndef LLERROR_H | |
8 | # define LLERROR_H | |
9 | ||
10 | extern bool /*@alt void@*/ check (bool p_x); | |
11 | # define check(p_x) doCheck (p_x, cstring_fromChars (#p_x), cstring_makeLiteralTemp (__FILE__), __LINE__) | |
12 | ||
13 | extern bool doCheck (bool p_x, cstring p_pred, cstring p_file, int p_line); | |
14 | ||
27c9e640 | 15 | extern /*@noreturnwhenfalse@*/ void llassert (/*@sef@*/ bool p_test); |
28bf4b0b | 16 | /*@-macroredef@*/ |
885824d3 | 17 | # define llassert(tst) \ |
18 | do { if (!(tst)) { \ | |
19 | if (context_getFlag (FLG_TRYTORECOVER)) checkParseError (); \ | |
20 | lldiagmsg (message ("%s:%d: at source point", \ | |
21 | cstring_makeLiteralTemp (__FILE__), __LINE__)); \ | |
22 | llbuglit ("llassert failed: " #tst); \ | |
23 | }} while (FALSE) | |
28bf4b0b | 24 | /*@=macroredef@*/ |
25 | ||
27c9e640 | 26 | extern /*@noreturnwhenfalse@*/ void llassertretnull (/*@sef@*/ bool p_test); |
28bf4b0b | 27 | # define llassertretnull(tst) \ |
28 | do { if (!(tst)) { \ | |
29 | if (context_getFlag (FLG_TRYTORECOVER)) checkParseError (); \ | |
30 | lldiagmsg (message ("%s:%d: at source point", \ | |
31 | cstring_makeLiteralTemp (__FILE__), __LINE__)); \ | |
32 | llbuglit ("llassert failed: " #tst); \ | |
28bf4b0b | 33 | }} while (FALSE) |
34 | ||
02b84d4b | 35 | typedef void *tx_voidptr; |
36 | ||
37 | extern /*@noreturnwhenfalse@*/ void | |
38 | llassertretval (/*@sef@*/ bool p_test, /*@sef@*/ /*@null@*/ tx_voidptr /*@alt anytype@*/ p_val); | |
abd7f895 | 39 | # define llassertretval(tst,val) \ |
40 | do { if (!(tst)) { \ | |
41 | if (context_getFlag (FLG_TRYTORECOVER)) checkParseError (); \ | |
42 | lldiagmsg (message ("%s:%d: at source point", \ | |
43 | cstring_makeLiteralTemp (__FILE__), __LINE__)); \ | |
44 | llbuglit ("llassert failed: " #tst); \ | |
45 | /*@-type@*/ return (val); /*@=type@*/ \ | |
46 | }} while (FALSE) | |
47 | ||
28bf4b0b | 48 | /* |
49 | ** Use this for assertions in error-generation code (that | |
50 | ** might lead to infinite loops of failed assertions if | |
51 | ** the normal error generation routines are used). | |
52 | */ | |
53 | ||
27c9e640 | 54 | extern /*@noreturnwhenfalse@*/ void llassertprotect (/*@sef@*/ bool p_test); |
28bf4b0b | 55 | # define llassertprotect(tst) \ |
56 | do { if (!(tst)) { \ | |
57 | fprintf (stderr, "%s:%d: at source point: ", __FILE__, __LINE__); \ | |
58 | fprintf (stderr, "protected fatal llassert failed: " #tst "\n"); \ | |
59 | llexit (EXIT_FAILURE); \ | |
60 | }} while (FALSE) | |
885824d3 | 61 | |
27c9e640 | 62 | extern /*@noreturnwhenfalse@*/ void llassertfatal (/*@sef@*/ bool p_test); |
885824d3 | 63 | # define llassertfatal(tst) \ |
64 | do { if (!(tst)) \ | |
65 | llfatalbug (message("%s:%d: fatal llassert failed: " #tst, \ | |
66 | cstring_makeLiteralTemp (__FILE__), __LINE__)); \ | |
67 | } while (FALSE) | |
68 | ||
69 | /* | |
1b8ae690 | 70 | ** llassertprint and llassertprintret are in splintMacros.nf |
885824d3 | 71 | */ |
72 | ||
80489f0a | 73 | extern void llmsg (/*@only@*/ cstring p_s) /*@modifies g_warningstream@*/ ; |
28bf4b0b | 74 | |
885824d3 | 75 | extern void lldiagmsg (/*@only@*/ cstring p_s) /*@modifies stderr@*/ ; |
80489f0a | 76 | extern void llmsgplain (/*@only@*/ cstring p_s) /*@modifies g_warningstream@*/ ; |
885824d3 | 77 | extern void llhint (/*@only@*/ cstring p_s) |
80489f0a | 78 | /*@globals g_currentloc, g_warningstream;@*/ |
79 | /*@modifies g_warningstream@*/ ; | |
28bf4b0b | 80 | |
80489f0a | 81 | extern /*@private@*/ /*@noreturn@*/ void |
82 | xllfatalbug (char *p_srcFile, int p_srcLine, /*@only@*/ cstring p_s) | |
28bf4b0b | 83 | /*@globals g_currentloc@*/ |
80489f0a | 84 | /*@modifies g_errorstream@*/ ; |
28bf4b0b | 85 | |
27c9e640 | 86 | extern /*@noreturn@*/ void llfatalbug (/*@only@*/ cstring p_s) |
885824d3 | 87 | /*@globals g_currentloc@*/ |
80489f0a | 88 | /*@modifies g_errorstream@*/ ; |
89 | ||
28bf4b0b | 90 | # define llfatalbug(p_s) \ |
91 | xllfatalbug (__FILE__, __LINE__, p_s) | |
92 | ||
28bf4b0b | 93 | extern /*@private@*/ bool xllgenerror (char *p_srcFile, int p_srcLine, flagcode p_o, |
94 | /*@only@*/ cstring p_s, fileloc p_fl) | |
80489f0a | 95 | /*@modifies g_warningstream@*/ ; |
28bf4b0b | 96 | |
97 | extern bool llgenerror (flagcode p_o, /*@only@*/ cstring p_s, fileloc p_fl) | |
80489f0a | 98 | /*@modifies g_warningstream@*/ ; |
28bf4b0b | 99 | # define llgenerror(p_o, p_s, p_fl) \ |
100 | xllgenerror (__FILE__, __LINE__, p_o, p_s, p_fl) | |
101 | ||
102 | extern /*@private@*/ bool | |
103 | xllgenhinterror (char *p_srcFile, int p_srcLine, | |
104 | flagcode p_o, /*@only@*/ cstring p_s, /*@only@*/ cstring p_hint, | |
105 | fileloc p_fl) | |
80489f0a | 106 | /*@modifies g_warningstream@*/ ; |
28bf4b0b | 107 | |
885824d3 | 108 | extern bool llgenhinterror (flagcode p_o, /*@only@*/ cstring p_s, /*@only@*/ cstring p_hint, |
80489f0a | 109 | fileloc p_fl) /*@modifies g_warningstream@*/ ; |
28bf4b0b | 110 | |
111 | # define llgenhinterror(p_o, p_s, p_hint, p_fl) \ | |
112 | xllgenhinterror (__FILE__, __LINE__, p_o, p_s, p_hint, p_fl) | |
113 | ||
114 | ||
885824d3 | 115 | extern void llerror (flagcode p_o, /*@only@*/ cstring p_s) |
80489f0a | 116 | /*@globals g_warningstream, g_currentloc@*/ |
117 | /*@modifies g_warningstream@*/ ; | |
28bf4b0b | 118 | # define llerror(p_o, p_s) \ |
119 | ((void) llgenerror (p_o, p_s, g_currentloc)) | |
120 | ||
80489f0a | 121 | extern void llgenmsg (/*@only@*/ cstring p_s, fileloc p_fl) |
122 | /*@modifies g_warningstream@*/ ; | |
123 | ||
01a8227e | 124 | extern /*@noreturn@*/ /*@private@*/ |
125 | void xllfatalerror (char *p_srcFile, int p_srcLine, /*@only@*/ cstring p_s) | |
126 | /*@modifies g_errorstream@*/ ; | |
127 | ||
80489f0a | 128 | extern /*@noreturn@*/ void llfatalerror (/*@only@*/ cstring p_s) |
129 | /*@modifies g_errorstream@*/ ; | |
01a8227e | 130 | # define llfatalerror(p_s) xllfatalerror (__FILE__, __LINE__, p_s) |
80489f0a | 131 | |
01a8227e | 132 | extern /*@noreturn@*/ /*@private@*/ void |
133 | xllfatalerrorLoc (char *p_srcFile, int p_srcLine, /*@only@*/ cstring p_s) | |
885824d3 | 134 | /*@globals g_currentloc@*/ |
80489f0a | 135 | /*@modifies g_errorstream@*/ ; |
136 | ||
01a8227e | 137 | extern /*@noreturn@*/ void llfatalerrorLoc (/*@only@*/ cstring p_s) |
138 | /*@globals g_currentloc@*/ | |
80489f0a | 139 | /*@modifies g_errorstream@*/ ; |
01a8227e | 140 | # define llfatalerrorLoc(p_s) xllfatalerrorLoc (__FILE__, __LINE__, p_s) |
141 | ||
142 | extern /*@private@*/ void | |
143 | xllparseerror (char *p_srcFile, int p_srcLine, /*@only@*/ cstring p_s) | |
b87215ab | 144 | /*@globals g_currentloc@*/ |
01a8227e | 145 | /*@modifies g_warningstream@*/ ; |
885824d3 | 146 | |
01a8227e | 147 | extern void llparseerror (/*@only@*/ cstring p_s) |
b87215ab | 148 | /*@globals g_currentloc@*/ |
149 | /*@modifies g_warningstream@*/ ; | |
150 | ||
01a8227e | 151 | # define llparseerror(p_s) xllparseerror (__FILE__, __LINE__, p_s) |
6fcd0b1e | 152 | |
80489f0a | 153 | extern /*@noreturn@*/ void lclplainfatalerror (/*@only@*/ cstring p_msg) /*@modifies g_warningstream@*/ ; |
154 | extern /*@noreturn@*/ void lclfatalbug (/*@temp@*/ char *p_msg) /*@modifies g_warningstream@*/ ; | |
885824d3 | 155 | extern int lclNumberErrors (void) /*@*/ ; |
156 | extern bool lclHadNewError (void) /*@modifies internalState@*/ ; | |
27c9e640 | 157 | extern /*@noreturn@*/ void lclfatalerror (ltoken p_t, /*@only@*/ cstring p_msg); |
28bf4b0b | 158 | |
159 | extern void xlclerror (char *p_srcFile, int p_srcLine, ltoken p_t, /*@only@*/ cstring p_msg) ; | |
160 | ||
885824d3 | 161 | extern void lclerror (ltoken p_t, /*@only@*/ cstring p_msg); |
28bf4b0b | 162 | # define lclerror(p_t,p_msg) \ |
163 | xlclerror (__FILE__, __LINE__, p_t, p_msg) | |
885824d3 | 164 | |
165 | extern void lclbug (/*@only@*/ cstring p_s); | |
166 | extern void lclplainerror (/*@only@*/ cstring p_msg); | |
167 | extern bool lclHadError (void); | |
168 | extern void lclRedeclarationError (ltoken p_id); | |
885824d3 | 169 | |
80489f0a | 170 | extern void llerror_flagWarning (/*@only@*/ cstring p_s) /*@modifies g_warningstream@*/ ; |
885824d3 | 171 | |
27c9e640 | 172 | extern /*@noreturn@*/ void llbugaux (cstring p_file, int p_line, /*@only@*/ cstring p_s) |
80489f0a | 173 | /*@globals g_warningstream, g_currentloc@*/ |
174 | /*@modifies *g_warningstream@*/ ; | |
885824d3 | 175 | |
27c9e640 | 176 | extern /*@noreturn@*/ void llbug (/*@only@*/ cstring p_s) |
80489f0a | 177 | /*@globals g_warningstream, g_currentloc@*/ |
178 | /*@modifies *g_warningstream@*/ ; | |
885824d3 | 179 | |
180 | /* doesn't really exit, but don't mind errors if it doesn't */ | |
181 | # define llbug(s) llbugaux (cstring_makeLiteralTemp (__FILE__), __LINE__, s) | |
182 | ||
80489f0a | 183 | extern void llquietbugaux (/*@only@*/ cstring p_s, cstring, int) /*@modifies *g_warningstream@*/ ; |
184 | extern void llquietbug (/*@only@*/ cstring) /*@modifies *g_warningstream@*/ ; | |
885824d3 | 185 | # define llquietbug(s) llquietbugaux (s, cstring_makeLiteralTemp (__FILE__), __LINE__) |
186 | ||
80489f0a | 187 | extern void llcontbug (/*@only@*/ cstring p_s) /*@modifies *g_warningstream@*/ ; |
885824d3 | 188 | /* doesn't really exit, but don't mind errors if it doesn't */ |
189 | # define llcontbug(s) (llbug (s)) | |
190 | ||
191 | extern void cleanupMessages (void) | |
80489f0a | 192 | /*@globals g_warningstream, g_currentloc;@*/ |
193 | /*@modifies g_warningstream, internalState@*/ ; | |
194 | ||
195 | extern void displayScan (/*@only@*/ cstring p_msg) | |
196 | /*@modifies g_messagestream@*/ ; | |
197 | ||
198 | extern void displayScanOpen (/*@only@*/ cstring p_msg) | |
199 | /*@modifies g_messagestream@*/ ; | |
200 | ||
201 | extern void displayScanContinue (/*@temp@*/ cstring p_msg) | |
202 | /*@modifies g_messagestream@*/ ; | |
203 | ||
204 | extern void displayScanClose (void) | |
205 | /*@modifies g_messagestream@*/ ; | |
885824d3 | 206 | |
207 | /* | |
208 | ** Report error iff f1 and f2 are set. | |
209 | */ | |
210 | ||
28bf4b0b | 211 | extern bool |
212 | xoptgenerror2 (char *p_srcFile, int p_srcLine, | |
213 | flagcode p_f1, flagcode p_f2, /*@only@*/ cstring p_s, fileloc p_loc) | |
80489f0a | 214 | /*@modifies *g_warningstream, internalState@*/ ; |
28bf4b0b | 215 | |
885824d3 | 216 | extern bool |
217 | optgenerror2 (flagcode p_f1, flagcode p_f2, /*@only@*/ cstring p_s, fileloc p_loc) | |
80489f0a | 218 | /*@modifies *g_warningstream, internalState@*/ ; |
28bf4b0b | 219 | # define optgenerror2(p_f1, p_f2, p_s, p_loc) \ |
220 | (xoptgenerror2 (__FILE__, __LINE__, p_f1, p_f2, p_s, p_loc)) | |
885824d3 | 221 | |
222 | /* | |
223 | ** Report error if f1 is set and f2 is not set. | |
224 | */ | |
225 | ||
28bf4b0b | 226 | extern bool |
227 | xoptgenerror2n (char *p_srcFile, int p_srcLine, | |
228 | flagcode p_f1, flagcode p_f2, /*@only@*/ cstring p_s, fileloc p_loc) | |
80489f0a | 229 | /*@modifies *g_warningstream, internalState@*/ ; |
28bf4b0b | 230 | |
885824d3 | 231 | extern bool |
232 | optgenerror2n (flagcode p_f1, flagcode p_f2, /*@only@*/ cstring p_s, fileloc p_loc) | |
80489f0a | 233 | /*@modifies *g_warningstream, internalState@*/ ; |
28bf4b0b | 234 | # define optgenerror2n(p_f1, p_f2, p_s, p_loc) \ |
235 | (xoptgenerror2n (__FILE__, __LINE__, p_f1, p_f2, p_s, p_loc)) | |
236 | ||
237 | extern /*@private@*/ bool xlloptgenerror (char *p_srcFile, int p_srcLine, flagcode p_o, /*@only@*/ cstring p_s, fileloc p_loc) | |
80489f0a | 238 | /*@modifies *g_warningstream, internalState@*/ ; |
885824d3 | 239 | |
240 | extern bool lloptgenerror (flagcode p_o, /*@only@*/ cstring p_s, fileloc p_loc) | |
80489f0a | 241 | /*@modifies *g_warningstream, internalState@*/ ; |
28bf4b0b | 242 | # define lloptgenerror(p_o, p_s, p_loc) \ |
243 | (xlloptgenerror (__FILE__, __LINE__, p_o, p_s, p_loc)) | |
244 | ||
245 | extern bool xllnoptgenerror (char *p_srcFile, int p_srcLine, | |
246 | flagcode p_o, /*@only@*/ cstring p_s, fileloc p_loc) | |
80489f0a | 247 | /*@modifies *g_warningstream, internalState@*/ ; |
885824d3 | 248 | |
249 | extern bool llnoptgenerror (flagcode p_o, /*@only@*/ cstring p_s, fileloc p_loc) | |
80489f0a | 250 | /*@modifies *g_warningstream, internalState@*/ ; |
28bf4b0b | 251 | # define llnoptgenerror(p_o, p_s, p_loc) \ |
252 | (xllnoptgenerror (__FILE__, __LINE__, p_o, p_s, p_loc)) | |
253 | ||
254 | extern /*@private@*/ bool | |
255 | xllgenformattypeerror (char *p_srcFile, int p_srcLine, | |
256 | ctype p_t1, exprNode p_e1, | |
257 | ctype p_t2, exprNode p_e2, | |
258 | /*@only@*/ cstring p_s, fileloc p_fl) | |
80489f0a | 259 | /*@modifies *g_warningstream, internalState@*/ ; |
885824d3 | 260 | |
261 | extern bool llgenformattypeerror (ctype p_t1, exprNode p_e1, | |
262 | ctype p_t2, exprNode p_e2, | |
263 | /*@only@*/ cstring p_s, fileloc p_fl) | |
80489f0a | 264 | /*@modifies *g_warningstream, internalState@*/ ; |
28bf4b0b | 265 | # define llgenformattypeerror(p_t1, p_e1, p_t2, p_e2, p_s, p_fl) \ |
266 | xllgenformattypeerror (__FILE__, __LINE__, p_t1, p_e1, p_t2, p_e2, p_s, p_fl) | |
267 | ||
268 | extern bool xllgentypeerror (char *p_srcFile, int p_srcLine, | |
269 | ctype p_t1, exprNode p_e1, | |
270 | ctype p_t2, exprNode p_e2, | |
271 | /*@only@*/ cstring p_s, | |
272 | fileloc p_fl) | |
80489f0a | 273 | /*@modifies *g_warningstream, internalState@*/ ; |
885824d3 | 274 | |
275 | extern bool llgentypeerror (ctype p_t1, exprNode p_e1, | |
276 | ctype p_t2, exprNode p_e2, | |
277 | /*@only@*/ cstring p_s, | |
278 | fileloc p_fl) | |
80489f0a | 279 | /*@modifies *g_warningstream, internalState@*/ ; |
28bf4b0b | 280 | # define llgentypeerror(p_t1, p_e1, p_t2, p_e2, p_s, p_fl) \ |
281 | xllgentypeerror (__FILE__, __LINE__, p_t1, p_e1, p_t2, p_e2, p_s, p_fl) | |
885824d3 | 282 | |
283 | extern bool gentypeerror (/*@sef@*/ ctype p_t1, | |
284 | /*@sef@*/ exprNode p_e1, | |
285 | /*@sef@*/ ctype p_t2, | |
286 | /*@sef@*/ exprNode p_e2, | |
287 | /*@sef@*/ /*@only@*/ cstring p_s, | |
288 | /*@sef@*/ fileloc p_loc) | |
80489f0a | 289 | /*@modifies *g_warningstream, internalState@*/ ; |
885824d3 | 290 | |
291 | /*@-branchstate@*/ /* sef only s is freed on one branch */ | |
292 | #define gentypeerror(t1, e1, t2, e2, s, loc) \ | |
293 | (context_suppressFlagMsg (FLG_TYPE,loc) \ | |
294 | ? (flagcode_recordSuppressed (FLG_TYPE), FALSE) \ | |
295 | : llgentypeerror (t1, e1, t2, e2, s, loc)) | |
296 | /*@=branchstate@*/ | |
297 | ||
298 | /* | |
299 | ** These are macros to save evaluating s (which may be some expensive | |
300 | ** message generation function). | |
301 | */ | |
302 | ||
303 | extern bool | |
304 | optgenerror (/*@sef@*/ flagcode p_o, /*@sef@*/ /*@only@*/ cstring p_s, | |
305 | /*@sef@*/ fileloc p_loc) | |
80489f0a | 306 | /*@modifies *g_warningstream, internalState@*/ ; |
885824d3 | 307 | |
308 | /*@-branchstate@*/ /* sef only s is freed on one branch */ | |
309 | #define optgenerror(o,s,loc) \ | |
310 | (context_suppressFlagMsg(o,loc) ? (flagcode_recordSuppressed(o), FALSE) \ | |
311 | : lloptgenerror (o, s, loc)) | |
312 | /*@=branchstate@*/ | |
313 | ||
314 | extern void | |
315 | voptgenerror (/*@sef@*/ flagcode p_o, /*@sef@*/ /*@only@*/ cstring p_s, | |
316 | /*@sef@*/ fileloc p_loc) | |
80489f0a | 317 | /*@modifies *g_warningstream, internalState@*/ ; |
885824d3 | 318 | #define voptgenerror(o, s, loc) ((void) optgenerror(o,s,loc)) |
319 | ||
28bf4b0b | 320 | extern /*@private@*/ bool |
321 | xfsgenerror (char *p_srcFile, int p_srcLine, | |
322 | flagSpec p_fs, /*@only@*/ cstring p_s, fileloc p_fl) | |
80489f0a | 323 | /*@modifies g_warningstream, internalState@*/ ; |
28bf4b0b | 324 | |
325 | extern bool fsgenerror (flagSpec p_fs, /*@only@*/ cstring p_s, fileloc p_fl) | |
80489f0a | 326 | /*@modifies g_warningstream, internalState@*/ ; |
28bf4b0b | 327 | # define fsgenerror(p_fs, p_s, p_fl) \ |
328 | xfsgenerror (__FILE__, __LINE__, p_fs, p_s, p_fl) | |
329 | ||
330 | extern void | |
331 | vfsgenerror (/*@sef@*/ flagSpec p_fs, /*@sef@*/ /*@only@*/ cstring p_s, | |
332 | /*@sef@*/ fileloc p_loc) | |
80489f0a | 333 | /*@modifies *g_warningstream, internalState@*/ ; |
28bf4b0b | 334 | #define vfsgenerror(fs, s, loc) ((void) fsgenerror(fs,s,loc)) |
335 | ||
336 | /* | |
337 | ** Reports a warning when f1 is ON and f2 is ON | |
338 | */ | |
339 | ||
885824d3 | 340 | extern void |
341 | voptgenerror2 (/*@sef@*/ flagcode p_f1, /*@sef@*/ flagcode p_f2, | |
28bf4b0b | 342 | /*@sef@*/ /*@only@*/ cstring p_s, /*@sef@*/ fileloc p_loc); |
885824d3 | 343 | #define voptgenerror2(f1, f2, s, loc) ((void) optgenerror2 (f1, f2, s, loc)) |
344 | ||
28bf4b0b | 345 | /* |
346 | ** Reports a warning when f1 is ON and f2 is OFF | |
347 | */ | |
348 | ||
885824d3 | 349 | extern void |
350 | voptgenerror2n (/*@sef@*/ flagcode p_f1, /*@sef@*/ flagcode p_f2, | |
351 | /*@sef@*/ /*@only@*/ cstring p_s, /*@sef@*/ fileloc p_loc); | |
352 | #define voptgenerror2n(f1, f2, s, loc) ((void) optgenerror2n (f1, f2, s, loc)) | |
353 | ||
354 | extern void noptgenerror (/*@sef@*/ flagcode p_code, | |
355 | /*@sef@*/ /*@only@*/ cstring p_s, | |
356 | /*@sef@*/ fileloc p_loc); | |
357 | /*@-branchstate@*/ /* sef only s is freed on one branch */ | |
358 | #define noptgenerror(o,s,loc) \ | |
359 | (context_suppressNotFlagMsg (o, loc) \ | |
360 | ? (flagcode_recordSuppressed(o), FALSE) \ | |
361 | : llnoptgenerror (o, s, loc)) | |
362 | /*@=branchstate@*/ | |
363 | ||
364 | extern void | |
365 | vnoptgenerror (/*@sef@*/ flagcode p_code, /*@sef@*/ /*@only@*/ cstring p_msg, | |
366 | /*@sef@*/ fileloc p_loc); | |
367 | # define vnoptgenerror(o, s, loc) ((void) noptgenerror(o, s, loc)) | |
368 | ||
369 | extern void | |
370 | vgenhinterror (flagcode p_code, /*@only@*/ cstring p_mst, | |
371 | /*@only@*/ cstring p_hint, /*@sef@*/ fileloc p_loc); | |
372 | # define vgenhinterror(o, s, h, loc) \ | |
373 | ((void) llgenhinterror(o, s, h, loc)) | |
374 | ||
28bf4b0b | 375 | |
376 | extern /*@private@*/ bool /*@alt void@*/ xllforceerror (char *p_srcFile, int p_srcLine, flagcode p_code, /*@only@*/ cstring p_s, fileloc p_fl) | |
80489f0a | 377 | /*@modifies g_warningstream@*/ ; |
28bf4b0b | 378 | |
379 | extern bool /*@alt void@*/ llforceerror (flagcode p_code, /*@only@*/ cstring p_s, fileloc p_fl) | |
80489f0a | 380 | /*@modifies g_warningstream@*/ ; |
28bf4b0b | 381 | # define llforceerror(p_code, p_s, p_fl) \ |
382 | (xllforceerror (__FILE__, __LINE__, p_code, p_s, p_fl)) | |
885824d3 | 383 | |
b072092f | 384 | extern /*@private@*/ bool xcppoptgenerror (char *p_srcFile, int p_srcLine, flagcode p_o, |
385 | /*@only@*/ cstring p_s, cppReader *p_pfile) | |
80489f0a | 386 | /*@modifies g_warningstream, p_pfile@*/ ; |
b072092f | 387 | |
80489f0a | 388 | extern bool /*@alt void@*/ |
389 | cppoptgenerror (flagcode p_code, /*@only@*/ cstring p_s, cppReader *p_pfile) | |
390 | /*@modifies g_warningstream, p_pfile@*/ ; | |
b072092f | 391 | # define cppoptgenerror(p_code, p_s, p_pfile) \ |
392 | (xcppoptgenerror (__FILE__, __LINE__, p_code, p_s, p_pfile)) | |
393 | ||
885824d3 | 394 | extern void llerrorlit (flagcode p_o, char *p_s); |
28bf4b0b | 395 | # define llerrorlit(o, s) ((void) llerror (o, cstring_makeLiteral (s))) |
396 | ||
80489f0a | 397 | extern void llgenindentmsg (/*@only@*/ cstring p_s, fileloc p_fl) /*@modifies g_warningstream@*/ ; |
885824d3 | 398 | |
27c9e640 | 399 | extern /*@noreturn@*/ void llbugexitlit (char *p_s); |
28bf4b0b | 400 | # define llbugexitlit(s) (llbug (cstring_makeLiteral (s))) |
885824d3 | 401 | |
28bf4b0b | 402 | extern void llbuglit (char *p_s); |
885824d3 | 403 | # define llbuglit(s) (llbug (cstring_makeLiteral (s))) |
28bf4b0b | 404 | |
405 | extern void llcontbuglit (char *p_s); | |
885824d3 | 406 | # define llcontbuglit(s) (llbug (cstring_makeLiteral (s))) |
885824d3 | 407 | |
408 | extern void checkParseError (void); | |
409 | ||
410 | extern void llmsglit (char *p_s); | |
411 | # define llmsglit(s) (llmsg (cstring_makeLiteral (s))) | |
412 | ||
413 | extern void ppllerror (/*@only@*/ cstring p_s); | |
80489f0a | 414 | |
885824d3 | 415 | extern void genppllerrorhint (flagcode p_code, /*@only@*/ cstring p_s, |
416 | /*@only@*/ cstring p_hint); | |
417 | extern void genppllerror (flagcode p_code, /*@only@*/ cstring p_s); | |
418 | extern /*@unused@*/ void pplldiagmsg (/*@only@*/ cstring p_s); | |
419 | extern void loadllmsg (/*@only@*/ cstring p_s); | |
420 | ||
421 | extern void llgenindentmsgnoloc (/*@only@*/ cstring p_s); | |
422 | ||
423 | extern /*@observer@*/ cstring lldecodeerror (int) /*@*/ ; | |
424 | ||
80489f0a | 425 | /* |
426 | ** should be static, but used in cpperror (which shouldn't exist) | |
427 | */ | |
428 | ||
429 | extern void prepareMessage (void) | |
430 | /*@modifies internalState, g_messagestream@*/ ; | |
431 | ||
432 | extern void closeMessage (void) | |
433 | /*@modifies internalState, g_messagestream@*/ ; | |
885824d3 | 434 | |
435 | extern void llflush (void) /*@modifies systemState@*/ ; | |
436 | ||
437 | # else | |
438 | # error "Multiple include" | |
439 | # endif | |
440 |