Branch data Line data Source code
1 : : /* Language-independent diagnostic subroutines that implicitly use global_dc.
2 : : Copyright (C) 1999-2025 Free Software Foundation, Inc.
3 : : Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
4 : :
5 : : This file is part of GCC.
6 : :
7 : : GCC is free software; you can redistribute it and/or modify it under
8 : : the terms of the GNU General Public License as published by the Free
9 : : Software Foundation; either version 3, or (at your option) any later
10 : : version.
11 : :
12 : : GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 : : WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 : : FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 : : for more details.
16 : :
17 : : You should have received a copy of the GNU General Public License
18 : : along with GCC; see the file COPYING3. If not see
19 : : <http://www.gnu.org/licenses/>. */
20 : :
21 : :
22 : : /* This file implements the parts of the language independent aspect
23 : : of diagnostic messages that implicitly use global_dc. */
24 : :
25 : : #include "config.h"
26 : : #include "system.h"
27 : : #include "coretypes.h"
28 : : #include "intl.h"
29 : : #include "diagnostic.h"
30 : : #include "diagnostic-format.h"
31 : :
32 : : /* A diagnostic_context surrogate for stderr. */
33 : : static diagnostic_context global_diagnostic_context;
34 : : diagnostic_context *global_dc = &global_diagnostic_context;
35 : :
36 : : /* Standard error reporting routines in increasing order of severity. */
37 : :
38 : : /* Text to be emitted verbatim to the error message stream; this
39 : : produces no prefix and disables line-wrapping. Use rarely.
40 : : It is ignored for machine-readable output formats. */
41 : : void
42 : 0 : verbatim (const char *gmsgid, ...)
43 : : {
44 : 0 : va_list ap;
45 : :
46 : 0 : va_start (ap, gmsgid);
47 : 0 : text_info text (_(gmsgid), &ap, errno);
48 : 0 : global_dc->report_verbatim (text);
49 : 0 : va_end (ap);
50 : 0 : }
51 : :
52 : : /* Wrapper around diagnostic_context::diagnostic_impl
53 : : implying global_dc and taking a variable argument list. */
54 : :
55 : : bool
56 : 49459 : emit_diagnostic (diagnostic_t kind,
57 : : location_t location,
58 : : diagnostic_option_id option_id,
59 : : const char *gmsgid, ...)
60 : : {
61 : 49459 : auto_diagnostic_group d;
62 : 49459 : va_list ap;
63 : 49459 : va_start (ap, gmsgid);
64 : 49459 : rich_location richloc (line_table, location);
65 : 49459 : bool ret = global_dc->diagnostic_impl (&richloc, nullptr, option_id,
66 : : gmsgid, &ap, kind);
67 : 49458 : va_end (ap);
68 : 98916 : return ret;
69 : 49458 : }
70 : :
71 : : /* As above, but for rich_location *. */
72 : :
73 : : bool
74 : 84 : emit_diagnostic (diagnostic_t kind,
75 : : rich_location *richloc,
76 : : diagnostic_option_id option_id,
77 : : const char *gmsgid, ...)
78 : : {
79 : 84 : auto_diagnostic_group d;
80 : 84 : va_list ap;
81 : 84 : va_start (ap, gmsgid);
82 : 84 : bool ret = global_dc->diagnostic_impl (richloc, nullptr, option_id,
83 : : gmsgid, &ap, kind);
84 : 84 : va_end (ap);
85 : 168 : return ret;
86 : 84 : }
87 : :
88 : : /* As above, but taking a variable argument list. */
89 : :
90 : : bool
91 : 3417 : emit_diagnostic_valist (diagnostic_t kind,
92 : : location_t location,
93 : : diagnostic_option_id option_id,
94 : : const char *gmsgid, va_list *ap)
95 : : {
96 : 3417 : rich_location richloc (line_table, location);
97 : 3417 : return global_dc->diagnostic_impl (&richloc, nullptr, option_id,
98 : 3417 : gmsgid, ap, kind);
99 : 3417 : }
100 : :
101 : : /* As above, but with rich_location and metadata. */
102 : :
103 : : bool
104 : 3803 : emit_diagnostic_valist_meta (diagnostic_t kind,
105 : : rich_location *richloc,
106 : : const diagnostic_metadata *metadata,
107 : : diagnostic_option_id option_id,
108 : : const char *gmsgid, va_list *ap)
109 : : {
110 : 3803 : return global_dc->diagnostic_impl (richloc, metadata, option_id,
111 : 3803 : gmsgid, ap, kind);
112 : : }
113 : :
114 : : /* An informative note at LOCATION. Use this for additional details on an error
115 : : message. */
116 : : void
117 : 95488 : inform (location_t location, const char *gmsgid, ...)
118 : : {
119 : 95488 : auto_diagnostic_group d;
120 : 95488 : va_list ap;
121 : 95488 : va_start (ap, gmsgid);
122 : 95488 : rich_location richloc (line_table, location);
123 : 95488 : global_dc->diagnostic_impl (&richloc, nullptr, -1, gmsgid, &ap, DK_NOTE);
124 : 95488 : va_end (ap);
125 : 95488 : }
126 : :
127 : : /* Same as "inform" above, but at RICHLOC. */
128 : : void
129 : 4189 : inform (rich_location *richloc, const char *gmsgid, ...)
130 : : {
131 : 4189 : gcc_assert (richloc);
132 : :
133 : 4189 : auto_diagnostic_group d;
134 : 4189 : va_list ap;
135 : 4189 : va_start (ap, gmsgid);
136 : 4189 : global_dc->diagnostic_impl (richloc, nullptr, -1, gmsgid, &ap, DK_NOTE);
137 : 4189 : va_end (ap);
138 : 4189 : }
139 : :
140 : : /* An informative note at LOCATION. Use this for additional details on an
141 : : error message. */
142 : : void
143 : 7102 : inform_n (location_t location, unsigned HOST_WIDE_INT n,
144 : : const char *singular_gmsgid, const char *plural_gmsgid, ...)
145 : : {
146 : 7102 : va_list ap;
147 : 7102 : va_start (ap, plural_gmsgid);
148 : 7102 : auto_diagnostic_group d;
149 : 7102 : rich_location richloc (line_table, location);
150 : 7102 : global_dc->diagnostic_n_impl (&richloc, nullptr, -1, n,
151 : : singular_gmsgid, plural_gmsgid,
152 : : &ap, DK_NOTE);
153 : 7102 : va_end (ap);
154 : 7102 : }
155 : :
156 : : /* A warning at INPUT_LOCATION. Use this for code which is correct according
157 : : to the relevant language specification but is likely to be buggy anyway.
158 : : Returns true if the warning was printed, false if it was inhibited. */
159 : : bool
160 : 84883433 : warning (diagnostic_option_id option_id, const char *gmsgid, ...)
161 : : {
162 : 84883433 : auto_diagnostic_group d;
163 : 84883433 : va_list ap;
164 : 84883433 : va_start (ap, gmsgid);
165 : 84883433 : rich_location richloc (line_table, input_location);
166 : 84883433 : bool ret = global_dc->diagnostic_impl (&richloc, nullptr, option_id,
167 : : gmsgid, &ap, DK_WARNING);
168 : 84883432 : va_end (ap);
169 : 169766864 : return ret;
170 : 84883432 : }
171 : :
172 : : /* A warning at LOCATION. Use this for code which is correct according to the
173 : : relevant language specification but is likely to be buggy anyway.
174 : : Returns true if the warning was printed, false if it was inhibited. */
175 : :
176 : : bool
177 : 4591554 : warning_at (location_t location,
178 : : diagnostic_option_id option_id,
179 : : const char *gmsgid, ...)
180 : : {
181 : 4591554 : auto_diagnostic_group d;
182 : 4591554 : va_list ap;
183 : 4591554 : va_start (ap, gmsgid);
184 : 4591554 : rich_location richloc (line_table, location);
185 : 4591554 : bool ret = global_dc->diagnostic_impl (&richloc, nullptr, option_id,
186 : : gmsgid, &ap, DK_WARNING);
187 : 4591548 : va_end (ap);
188 : 9183096 : return ret;
189 : 4591548 : }
190 : :
191 : : /* Same as "warning at" above, but using RICHLOC. */
192 : :
193 : : bool
194 : 2006 : warning_at (rich_location *richloc,
195 : : diagnostic_option_id option_id,
196 : : const char *gmsgid, ...)
197 : : {
198 : 2006 : gcc_assert (richloc);
199 : :
200 : 2006 : auto_diagnostic_group d;
201 : 2006 : va_list ap;
202 : 2006 : va_start (ap, gmsgid);
203 : 2006 : bool ret = global_dc->diagnostic_impl (richloc, nullptr, option_id,
204 : : gmsgid, &ap, DK_WARNING);
205 : 2006 : va_end (ap);
206 : 4012 : return ret;
207 : 2006 : }
208 : :
209 : : /* Same as "warning at" above, but using METADATA. */
210 : :
211 : : bool
212 : 12 : warning_meta (rich_location *richloc,
213 : : const diagnostic_metadata &metadata,
214 : : diagnostic_option_id option_id,
215 : : const char *gmsgid, ...)
216 : : {
217 : 12 : gcc_assert (richloc);
218 : :
219 : 12 : auto_diagnostic_group d;
220 : 12 : va_list ap;
221 : 12 : va_start (ap, gmsgid);
222 : 12 : bool ret = global_dc->diagnostic_impl (richloc, &metadata, option_id,
223 : : gmsgid, &ap, DK_WARNING);
224 : 12 : va_end (ap);
225 : 24 : return ret;
226 : 12 : }
227 : :
228 : : /* Same as warning_n plural variant below, but using RICHLOC. */
229 : :
230 : : bool
231 : 103 : warning_n (rich_location *richloc,
232 : : diagnostic_option_id option_id,
233 : : unsigned HOST_WIDE_INT n,
234 : : const char *singular_gmsgid, const char *plural_gmsgid, ...)
235 : : {
236 : 103 : gcc_assert (richloc);
237 : :
238 : 103 : auto_diagnostic_group d;
239 : 103 : va_list ap;
240 : 103 : va_start (ap, plural_gmsgid);
241 : 103 : bool ret = global_dc->diagnostic_n_impl (richloc, nullptr, option_id, n,
242 : : singular_gmsgid, plural_gmsgid,
243 : : &ap, DK_WARNING);
244 : 103 : va_end (ap);
245 : 206 : return ret;
246 : 103 : }
247 : :
248 : : /* A warning at LOCATION. Use this for code which is correct according to the
249 : : relevant language specification but is likely to be buggy anyway.
250 : : Returns true if the warning was printed, false if it was inhibited. */
251 : :
252 : : bool
253 : 4364 : warning_n (location_t location,
254 : : diagnostic_option_id option_id,
255 : : unsigned HOST_WIDE_INT n,
256 : : const char *singular_gmsgid, const char *plural_gmsgid, ...)
257 : : {
258 : 4364 : auto_diagnostic_group d;
259 : 4364 : va_list ap;
260 : 4364 : va_start (ap, plural_gmsgid);
261 : 4364 : rich_location richloc (line_table, location);
262 : 4364 : bool ret = global_dc->diagnostic_n_impl (&richloc, nullptr, option_id, n,
263 : : singular_gmsgid, plural_gmsgid,
264 : : &ap, DK_WARNING);
265 : 4364 : va_end (ap);
266 : 8728 : return ret;
267 : 4364 : }
268 : :
269 : : /* A "pedantic" warning at LOCATION: issues a warning unless
270 : : -pedantic-errors was given on the command line, in which case it
271 : : issues an error. Use this for diagnostics required by the relevant
272 : : language standard, if you have chosen not to make them errors.
273 : :
274 : : Note that these diagnostics are issued independent of the setting
275 : : of the -Wpedantic command-line switch. To get a warning enabled
276 : : only with that switch, use either "if (pedantic) pedwarn
277 : : (OPT_Wpedantic,...)" or just "pedwarn (OPT_Wpedantic,..)". To get a
278 : : pedwarn independently of the -Wpedantic switch use "pedwarn (0,...)".
279 : :
280 : : Returns true if the warning was printed, false if it was inhibited. */
281 : :
282 : : bool
283 : 909966 : pedwarn (location_t location,
284 : : diagnostic_option_id option_id,
285 : : const char *gmsgid, ...)
286 : : {
287 : 909966 : auto_diagnostic_group d;
288 : 909966 : va_list ap;
289 : 909966 : va_start (ap, gmsgid);
290 : 909966 : rich_location richloc (line_table, location);
291 : 909966 : bool ret = global_dc->diagnostic_impl (&richloc, nullptr, option_id,
292 : : gmsgid, &ap, DK_PEDWARN);
293 : 909966 : va_end (ap);
294 : 1819932 : return ret;
295 : 909966 : }
296 : :
297 : : /* Same as pedwarn above, but using RICHLOC. */
298 : :
299 : : bool
300 : 1402 : pedwarn (rich_location *richloc,
301 : : diagnostic_option_id option_id,
302 : : const char *gmsgid, ...)
303 : : {
304 : 1402 : gcc_assert (richloc);
305 : :
306 : 1402 : auto_diagnostic_group d;
307 : 1402 : va_list ap;
308 : 1402 : va_start (ap, gmsgid);
309 : 1402 : bool ret = global_dc->diagnostic_impl (richloc, nullptr, option_id,
310 : : gmsgid, &ap, DK_PEDWARN);
311 : 1402 : va_end (ap);
312 : 2804 : return ret;
313 : 1402 : }
314 : :
315 : : /* A "permissive" error at LOCATION: issues an error unless
316 : : -fpermissive was given on the command line, in which case it issues
317 : : a warning. Use this for things that really should be errors but we
318 : : want to support legacy code.
319 : :
320 : : Returns true if the warning was printed, false if it was inhibited. */
321 : :
322 : : bool
323 : 2297 : permerror (location_t location, const char *gmsgid, ...)
324 : : {
325 : 2297 : auto_diagnostic_group d;
326 : 2297 : va_list ap;
327 : 2297 : va_start (ap, gmsgid);
328 : 2297 : rich_location richloc (line_table, location);
329 : 2297 : bool ret = global_dc->diagnostic_impl (&richloc, nullptr, -1, gmsgid, &ap,
330 : : DK_PERMERROR);
331 : 2297 : va_end (ap);
332 : 4594 : return ret;
333 : 2297 : }
334 : :
335 : : /* Same as "permerror" above, but at RICHLOC. */
336 : :
337 : : bool
338 : 1476 : permerror (rich_location *richloc, const char *gmsgid, ...)
339 : : {
340 : 1476 : gcc_assert (richloc);
341 : :
342 : 1476 : auto_diagnostic_group d;
343 : 1476 : va_list ap;
344 : 1476 : va_start (ap, gmsgid);
345 : 1476 : bool ret = global_dc->diagnostic_impl (richloc, nullptr, -1, gmsgid, &ap,
346 : : DK_PERMERROR);
347 : 1476 : va_end (ap);
348 : 2952 : return ret;
349 : 1476 : }
350 : :
351 : : /* Similar to the above, but controlled by a flag other than -fpermissive.
352 : : As above, an error by default or a warning with -fpermissive, but this
353 : : diagnostic can also be downgraded by -Wno-error=opt. */
354 : :
355 : : bool
356 : 12152 : permerror_opt (location_t location,
357 : : diagnostic_option_id option_id,
358 : : const char *gmsgid, ...)
359 : : {
360 : 12152 : auto_diagnostic_group d;
361 : 12152 : va_list ap;
362 : 12152 : va_start (ap, gmsgid);
363 : 12152 : rich_location richloc (line_table, location);
364 : 12152 : bool ret = global_dc->diagnostic_impl (&richloc, nullptr, option_id,
365 : : gmsgid, &ap, DK_PERMERROR);
366 : 12152 : va_end (ap);
367 : 24304 : return ret;
368 : 12152 : }
369 : :
370 : : /* Same as "permerror" above, but at RICHLOC. */
371 : :
372 : : bool
373 : 1558 : permerror_opt (rich_location *richloc,
374 : : diagnostic_option_id option_id,
375 : : const char *gmsgid, ...)
376 : : {
377 : 1558 : gcc_assert (richloc);
378 : :
379 : 1558 : auto_diagnostic_group d;
380 : 1558 : va_list ap;
381 : 1558 : va_start (ap, gmsgid);
382 : 1558 : bool ret = global_dc->diagnostic_impl (richloc, nullptr, option_id,
383 : : gmsgid, &ap, DK_PERMERROR);
384 : 1558 : va_end (ap);
385 : 3116 : return ret;
386 : 1558 : }
387 : :
388 : : /* A hard error: the code is definitely ill-formed, and an object file
389 : : will not be produced. */
390 : : void
391 : 20793 : error (const char *gmsgid, ...)
392 : : {
393 : 20793 : auto_diagnostic_group d;
394 : 20793 : va_list ap;
395 : 20793 : va_start (ap, gmsgid);
396 : 20793 : rich_location richloc (line_table, input_location);
397 : 20793 : global_dc->diagnostic_impl (&richloc, nullptr, -1, gmsgid, &ap, DK_ERROR);
398 : 20793 : va_end (ap);
399 : 20793 : }
400 : :
401 : : /* A hard error: the code is definitely ill-formed, and an object file
402 : : will not be produced. */
403 : : void
404 : 74 : error_n (location_t location, unsigned HOST_WIDE_INT n,
405 : : const char *singular_gmsgid, const char *plural_gmsgid, ...)
406 : : {
407 : 74 : auto_diagnostic_group d;
408 : 74 : va_list ap;
409 : 74 : va_start (ap, plural_gmsgid);
410 : 74 : rich_location richloc (line_table, location);
411 : 74 : global_dc->diagnostic_n_impl (&richloc, nullptr, -1, n,
412 : : singular_gmsgid, plural_gmsgid,
413 : : &ap, DK_ERROR);
414 : 74 : va_end (ap);
415 : 74 : }
416 : :
417 : : /* Same as above, but use location LOC instead of input_location. */
418 : : void
419 : 71690 : error_at (location_t loc, const char *gmsgid, ...)
420 : : {
421 : 71690 : auto_diagnostic_group d;
422 : 71690 : va_list ap;
423 : 71690 : va_start (ap, gmsgid);
424 : 71690 : rich_location richloc (line_table, loc);
425 : 71690 : global_dc->diagnostic_impl (&richloc, nullptr, -1, gmsgid, &ap, DK_ERROR);
426 : 71690 : va_end (ap);
427 : 71690 : }
428 : :
429 : : /* Same as above, but use RICH_LOC. */
430 : :
431 : : void
432 : 12921 : error_at (rich_location *richloc, const char *gmsgid, ...)
433 : : {
434 : 12921 : gcc_assert (richloc);
435 : :
436 : 12921 : auto_diagnostic_group d;
437 : 12921 : va_list ap;
438 : 12921 : va_start (ap, gmsgid);
439 : 12921 : global_dc->diagnostic_impl (richloc, nullptr, -1, gmsgid, &ap, DK_ERROR);
440 : 12921 : va_end (ap);
441 : 12921 : }
442 : :
443 : : /* Same as above, but with metadata. */
444 : :
445 : : void
446 : 757 : error_meta (rich_location *richloc, const diagnostic_metadata &metadata,
447 : : const char *gmsgid, ...)
448 : : {
449 : 757 : gcc_assert (richloc);
450 : :
451 : 757 : auto_diagnostic_group d;
452 : 757 : va_list ap;
453 : 757 : va_start (ap, gmsgid);
454 : 757 : global_dc->diagnostic_impl (richloc, &metadata, -1, gmsgid, &ap, DK_ERROR);
455 : 757 : va_end (ap);
456 : 757 : }
457 : :
458 : : /* "Sorry, not implemented." Use for a language feature which is
459 : : required by the relevant specification but not implemented by GCC.
460 : : An object file will not be produced. */
461 : : void
462 : 89 : sorry (const char *gmsgid, ...)
463 : : {
464 : 89 : auto_diagnostic_group d;
465 : 89 : va_list ap;
466 : 89 : va_start (ap, gmsgid);
467 : 89 : rich_location richloc (line_table, input_location);
468 : 89 : global_dc->diagnostic_impl (&richloc, nullptr, -1, gmsgid, &ap, DK_SORRY);
469 : 89 : va_end (ap);
470 : 89 : }
471 : :
472 : : /* Same as above, but use location LOC instead of input_location. */
473 : : void
474 : 418 : sorry_at (location_t loc, const char *gmsgid, ...)
475 : : {
476 : 418 : auto_diagnostic_group d;
477 : 418 : va_list ap;
478 : 418 : va_start (ap, gmsgid);
479 : 418 : rich_location richloc (line_table, loc);
480 : 418 : global_dc->diagnostic_impl (&richloc, nullptr, -1, gmsgid, &ap, DK_SORRY);
481 : 414 : va_end (ap);
482 : 414 : }
483 : :
484 : : /* Return true if an error or a "sorry" has been seen on global_dc. Various
485 : : processing is disabled after errors. */
486 : : bool
487 : 1310846472 : seen_error (void)
488 : : {
489 : 1310846472 : return errorcount || sorrycount;
490 : : }
491 : :
492 : : /* An error which is severe enough that we make no attempt to
493 : : continue. Do not use this for internal consistency checks; that's
494 : : internal_error. Use of this function should be rare. */
495 : : void
496 : 311 : fatal_error (location_t loc, const char *gmsgid, ...)
497 : : {
498 : 311 : auto_diagnostic_group d;
499 : 311 : va_list ap;
500 : 311 : va_start (ap, gmsgid);
501 : 311 : rich_location richloc (line_table, loc);
502 : 311 : global_dc->diagnostic_impl (&richloc, nullptr, -1, gmsgid, &ap, DK_FATAL);
503 : 0 : va_end (ap);
504 : :
505 : 0 : gcc_unreachable ();
506 : : }
507 : :
508 : : /* An internal consistency check has failed. We make no attempt to
509 : : continue. */
510 : : void
511 : 80 : internal_error (const char *gmsgid, ...)
512 : : {
513 : 80 : auto_diagnostic_group d;
514 : 80 : va_list ap;
515 : 80 : va_start (ap, gmsgid);
516 : 80 : rich_location richloc (line_table, input_location);
517 : 80 : global_dc->diagnostic_impl (&richloc, nullptr, -1, gmsgid, &ap, DK_ICE);
518 : 0 : va_end (ap);
519 : :
520 : 0 : gcc_unreachable ();
521 : : }
522 : :
523 : : /* Like internal_error, but no backtrace will be printed. Used when
524 : : the internal error does not happen at the current location, but happened
525 : : somewhere else. */
526 : : void
527 : 0 : internal_error_no_backtrace (const char *gmsgid, ...)
528 : : {
529 : 0 : auto_diagnostic_group d;
530 : 0 : va_list ap;
531 : 0 : va_start (ap, gmsgid);
532 : 0 : rich_location richloc (line_table, input_location);
533 : 0 : global_dc->diagnostic_impl (&richloc, nullptr, -1, gmsgid, &ap, DK_ICE_NOBT);
534 : 0 : va_end (ap);
535 : :
536 : 0 : gcc_unreachable ();
537 : : }
538 : :
539 : :
540 : : /* Special case error functions. Most are implemented in terms of the
541 : : above, or should be. */
542 : :
543 : : /* Print a diagnostic MSGID on FILE. This is just fprintf, except it
544 : : runs its second argument through gettext. */
545 : : void
546 : 20349 : fnotice (FILE *file, const char *cmsgid, ...)
547 : : {
548 : : /* If the user requested one of the machine-readable diagnostic output
549 : : formats on stderr (e.g. -fdiagnostics-format=sarif-stderr), then
550 : : emitting free-form text on stderr will lead to corrupt output.
551 : : Skip the message for such cases. */
552 : 20349 : if (file == stderr && global_dc)
553 : 17845 : if (!global_dc->supports_fnotice_on_stderr_p ())
554 : 0 : return;
555 : :
556 : 20349 : va_list ap;
557 : :
558 : 20349 : va_start (ap, cmsgid);
559 : 20349 : vfprintf (file, _(cmsgid), ap);
560 : 20349 : va_end (ap);
561 : : }
562 : :
563 : : /* class auto_diagnostic_group. */
564 : :
565 : : /* Constructor: "push" this group into global_dc. */
566 : :
567 : 800119017 : auto_diagnostic_group::auto_diagnostic_group ()
568 : : {
569 : 800119017 : global_dc->begin_group ();
570 : 800119017 : }
571 : :
572 : : /* Destructor: "pop" this group from global_dc. */
573 : :
574 : 800118580 : auto_diagnostic_group::~auto_diagnostic_group ()
575 : : {
576 : 800118580 : global_dc->end_group ();
577 : 800118580 : }
578 : :
579 : : /* class auto_diagnostic_nesting_level. */
580 : :
581 : 23871 : auto_diagnostic_nesting_level::auto_diagnostic_nesting_level ()
582 : : {
583 : 23871 : global_dc->push_nesting_level ();
584 : 23871 : }
585 : :
586 : 23871 : auto_diagnostic_nesting_level::~auto_diagnostic_nesting_level ()
587 : : {
588 : 23871 : global_dc->pop_nesting_level ();
589 : 23871 : }
|