Mercurial > hg > CbC > CbC_gcc
comparison gcc/diagnostic.h @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 84e7813d76e9 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
130:e108057fa461 | 132:d34655255c78 |
---|---|
1 /* Various declarations for language-independent diagnostics subroutines. | 1 /* Various declarations for language-independent diagnostics subroutines. |
2 Copyright (C) 2000-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2000-2018 Free Software Foundation, Inc. |
3 Contributed by Gabriel Dos Reis <gdr@codesourcery.com> | 3 Contributed by Gabriel Dos Reis <gdr@codesourcery.com> |
4 | 4 |
5 This file is part of GCC. | 5 This file is part of GCC. |
6 | 6 |
7 GCC is free software; you can redistribute it and/or modify it under | 7 GCC is free software; you can redistribute it and/or modify it under |
202 and false for frontends that merely specify points within the | 202 and false for frontends that merely specify points within the |
203 source code (to avoid e.g. colorizing just the first character in | 203 source code (to avoid e.g. colorizing just the first character in |
204 a token, which would look strange). */ | 204 a token, which would look strange). */ |
205 bool colorize_source_p; | 205 bool colorize_source_p; |
206 | 206 |
207 /* When printing source code, should labelled ranges be printed? */ | |
208 bool show_labels_p; | |
209 | |
210 /* When printing source code, should there be a left-hand margin | |
211 showing line numbers? */ | |
212 bool show_line_numbers_p; | |
213 | |
214 /* If printing source code, what should the minimum width of the margin | |
215 be? Line numbers will be right-aligned, and padded to this width. */ | |
216 int min_margin_width; | |
217 | |
207 /* Usable by plugins; if true, print a debugging ruler above the | 218 /* Usable by plugins; if true, print a debugging ruler above the |
208 source output. */ | 219 source output. */ |
209 bool show_ruler_p; | 220 bool show_ruler_p; |
210 | 221 |
211 /* If true, print fixits in machine-parseable form after the | 222 /* If true, print fixits in machine-parseable form after the |
213 bool parseable_fixits_p; | 224 bool parseable_fixits_p; |
214 | 225 |
215 /* If non-NULL, an edit_context to which fix-it hints should be | 226 /* If non-NULL, an edit_context to which fix-it hints should be |
216 applied, for generating patches. */ | 227 applied, for generating patches. */ |
217 edit_context *edit_context_ptr; | 228 edit_context *edit_context_ptr; |
229 | |
230 /* How many diagnostic_group instances are currently alive. */ | |
231 int diagnostic_group_nesting_depth; | |
232 | |
233 /* How many diagnostics have been emitted since the bottommost | |
234 diagnostic_group was pushed. */ | |
235 int diagnostic_group_emission_count; | |
236 | |
237 /* Optional callbacks for handling diagnostic groups. */ | |
238 | |
239 /* If non-NULL, this will be called immediately before the first | |
240 time a diagnostic is emitted within a stack of groups. */ | |
241 void (*begin_group_cb) (diagnostic_context * context); | |
242 | |
243 /* If non-NULL, this will be called when a stack of groups is | |
244 popped if any diagnostics were emitted within that group. */ | |
245 void (*end_group_cb) (diagnostic_context * context); | |
218 }; | 246 }; |
219 | 247 |
220 static inline void | 248 static inline void |
221 diagnostic_inhibit_notes (diagnostic_context * context) | 249 diagnostic_inhibit_notes (diagnostic_context * context) |
222 { | 250 { |
247 | 275 |
248 /* This diagnostic_context is used by front-ends that directly output | 276 /* This diagnostic_context is used by front-ends that directly output |
249 diagnostic messages without going through `error', `warning', | 277 diagnostic messages without going through `error', `warning', |
250 and similar functions. */ | 278 and similar functions. */ |
251 extern diagnostic_context *global_dc; | 279 extern diagnostic_context *global_dc; |
280 | |
281 /* Returns whether the diagnostic framework has been intialized already and is | |
282 ready for use. */ | |
283 #define diagnostic_ready_p() (global_dc->printer != NULL) | |
252 | 284 |
253 /* The total count of a KIND of diagnostics emitted so far. */ | 285 /* The total count of a KIND of diagnostics emitted so far. */ |
254 #define diagnostic_kind_count(DC, DK) (DC)->diagnostic_count[(int) (DK)] | 286 #define diagnostic_kind_count(DC, DK) (DC)->diagnostic_count[(int) (DK)] |
255 | 287 |
256 /* The number of errors that have been issued so far. Ideally, these | 288 /* The number of errors that have been issued so far. Ideally, these |