diff options
author | Gabriel Dos Reis <gdr@codesourcery.com> | 2000-08-20 09:50:12 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2000-08-20 09:50:12 +0000 |
commit | e2840263c7138632298aae686b2acbcf91fb9e77 (patch) | |
tree | a48feb8c4b79b8c4f09b952ea1e0f1cbca855311 /gcc/c-errors.c | |
parent | 1293daae2b80a40d3325f54ddbe139385edfde98 (diff) | |
download | gcc-e2840263c7138632298aae686b2acbcf91fb9e77.zip gcc-e2840263c7138632298aae686b2acbcf91fb9e77.tar.gz gcc-e2840263c7138632298aae686b2acbcf91fb9e77.tar.bz2 |
c-errors.c (pedwarn_c99): Adjust call to report_diagnostic.
* c-errors.c (pedwarn_c99): Adjust call to report_diagnostic.
* diagnostic.c (default_diagnostic_starter,
default_diagnostic_finalizer): New functions.
(diagnostic_for_asm, diagnostic_for_decl): Tweak.
(pedwarn, pedwarn_with_file_and_line, error,
error_with_file_and_line, fatal, warning,
warning_with_file_and_line): Adjust call to report_diagnostic.
(report_diagnostic): Rework.
(set_diagnostic_context): New function.
* diagnostic.h (struct diagnostic_context): New data structure.
(diagnostic_message, diagnostic_argument_list,
diagnostic_file_location, diagnostic_line_location,
diagnostic_is_warning, diagnostic_starter, diagnostic_finalizer,
diagnostic_finalizer, diagnostic_auxiliary_data): New macros.
(set_diagnostic_context): Declare.
(report_diagnostic): Change prototype.
From-SVN: r35817
Diffstat (limited to 'gcc/c-errors.c')
-rw-r--r-- | gcc/c-errors.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/c-errors.c b/gcc/c-errors.c index 7c86be9..562915b 100644 --- a/gcc/c-errors.c +++ b/gcc/c-errors.c @@ -36,6 +36,7 @@ pedwarn_c99 VPARAMS ((const char *msgid, ...)) const char *msgid; #endif va_list ap; + diagnostic_context dc; VA_START (ap, msgid); @@ -43,7 +44,8 @@ pedwarn_c99 VPARAMS ((const char *msgid, ...)) msgid = va_arg (ap, const char *); #endif - report_diagnostic (msgid, &ap, input_filename, lineno, - !flag_isoc99 || !flag_pedantic_errors); + set_diagnostic_context (&dc, msgid, &ap, input_filename, lineno, + !flag_isoc99 || !flag_pedantic_errors); + report_diagnostic (&dc); va_end (ap); } |