/* Language-independent diagnostic subroutines for the GNU Compiler Collection
- Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
This file is part of GCC.
diagnostic_info *);
static void real_abort (void) ATTRIBUTE_NORETURN;
-extern int rtl_dump_and_exit;
-
/* A diagnostic_context surrogate for stderr. */
static diagnostic_context global_diagnostic_context;
diagnostic_context *global_dc = &global_diagnostic_context;
;
/* Extract the location information if any. */
- if (*p == '%' && *++p == 'H')
+ if (p[0] == '%' && p[1] == 'H')
{
*locus = *va_arg (*text->args_ptr, location_t *);
- text->format_spec = p + 1;
+ text->format_spec = p + 2;
+ return true;
+ }
+ else if (p[0] == '%' && p[1] == 'J')
+ {
+ tree t = va_arg (*text->args_ptr, tree);
+ *locus = DECL_SOURCE_LOCATION (t);
+ text->format_spec = p + 2;
return true;
}
diagnostic_report_current_function (diagnostic_context *context)
{
diagnostic_report_current_module (context);
- (*lang_hooks.print_error_function) (context, input_filename);
+ lang_hooks.print_error_function (context, input_filename);
}
void