va_arg *, and why not.
Mark Mitchell
mark@codesourcery.com
Sun Jul 16 22:01:00 GMT 2000
*************** report_diagnostic (msg, args, file, line
*** 1479,1491 ****
int line;
int warn;
{
output_state os;
if (!count_error (warn))
return;
os = diagnostic_buffer->state;
diagnostic_msg = msg;
! diagnostic_args = &args;
report_error_function (file);
output_set_prefix
(diagnostic_buffer, context_as_prefix (file, line, warn));
--- 1479,1493 ----
int line;
int warn;
{
+ va_list ap;
output_state os;
if (!count_error (warn))
return;
+ va_copy (ap, args);
os = diagnostic_buffer->state;
diagnostic_msg = msg;
! diagnostic_args = ≈
report_error_function (file);
output_set_prefix
(diagnostic_buffer, context_as_prefix (file, line, warn));
*************** report_diagnostic (msg, args, file, line
*** 1493,1496 ****
--- 1495,1499 ----
finish_diagnostic ();
output_destroy_prefix (diagnostic_buffer);
diagnostic_buffer->state = os;
+ va_end (ap);
}
It looks like you are using va_copy, which Geoff said isn't fully
portable.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-bugs
mailing list