diff options
author | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-20 09:50:12 +0000 |
---|---|---|
committer | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-20 09:50:12 +0000 |
commit | 92d99247ad8850e85d50d3e6561c83d066712a18 (patch) | |
tree | a48feb8c4b79b8c4f09b952ea1e0f1cbca855311 /gcc/c-errors.c | |
parent | 46932f2c57551c6764d2dc9789140a043e00dc74 (diff) | |
download | gcc-92d99247ad8850e85d50d3e6561c83d066712a18.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35817 138bc75d-0d04-0410-961f-82ee72b054a4
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 7c86be9211b..562915bb278 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); } |