diff options
author | Gabriel Dos Reis <gdr@codesourcery.com> | 2000-05-14 08:44:48 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2000-05-14 08:44:48 +0000 |
commit | 856b62442f6fc5e4302ae9ee1ebce8a19bbd8681 (patch) | |
tree | dac211226e72c1c066f0126c59594854c2e7a190 /gcc/diagnostic.h | |
parent | 54dce48b80a26bce6c05a38f2faa68ee87d41e98 (diff) | |
download | gcc-856b62442f6fc5e4302ae9ee1ebce8a19bbd8681.tar.gz |
diagnostic.h (DIAGNOSTICS_SHOW_PREFIX_ONCE): New macro.
2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
* diagnostic.h (DIAGNOSTICS_SHOW_PREFIX_ONCE): New macro.
(DIAGNOSTICS_SHOW_PREFIX_NEVER): Likewise.
(DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE): Likewise.
(struct output_buffer: emitted_prefix_p, prefixing_rule): New
fields.
(set_message_prefixing_rule): Declare.
* diagnostic.c: (current_prefixing_rule): New variable.
(set_message_prefixing_rule): Define.
(output_set_prefix): Adjust buffer->emitted_prefix_p.
(init_output_buffer): Adjust Initialization.
(output_emit_prefix): Rewrite. Take prefixing rules into account.
cp/
2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
* lex.c: #include diagnostic.h.
(lang_init_options): Set default prefixing rules.
* lang-options.h: Add -fdiagnostics-show-location=.
* decl2.c: #include diagnostic.h.
(lang_decode_option): Handle -fdiagnostics-show-location=.
From-SVN: r33890
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r-- | gcc/diagnostic.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index d6a5748eb69..38edfc9c3db 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA. */ /* Forward declarations. */ typedef struct output_buffer output_buffer; +#define DIAGNOSTICS_SHOW_PREFIX_ONCE 0x0 +#define DIAGNOSTICS_SHOW_PREFIX_NEVER 0x1 +#define DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE 0x2 + /* The type of front-end specific hook that formats trees into an output_buffer. */ typedef void (*printer_fn) PARAMS ((output_buffer *)); @@ -49,6 +53,14 @@ struct output_buffer /* The ideal upper bound of number of characters per line, as suggested by front-end. */ int ideal_maximum_length; + /* Nonzero if current PREFIX was emitted at least once. */ + int emitted_prefix_p; + /* Tells how often current PREFIX should be emitted: + o DIAGNOSTICS_SHOW_PREFIX_NEVER: never - not yet supported; + o DIAGNOSTICS_SHOW_PREFIX_ONCE: emit current PREFIX only once; + o DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE: emit current PREFIX each time + a physical line is started. */ + int prefixing_rule; /* Public fields. These are used by front-ends to extract formats and arguments from the variable argument-list passed to output_format. */ @@ -92,5 +104,6 @@ void output_printf PARAMS ((output_buffer *, const char *, ...)) ATTRIBUTE_PRINTF_2; void output_format PARAMS ((output_buffer *, const char *)); int output_is_line_wrapping PARAMS ((output_buffer *)); +void set_message_prefixing_rule PARAMS ((int)); #endif /* __GCC_DIAGNOSTIC_H__ */ |