aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-03-20 07:58:41 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-03-20 07:58:41 +0000
commit7afff7cfb08e971723fee6a6b4ed508a3fdf9c26 (patch)
treeccf85c553253b7983f44238b9ca26593595b53df /gcc/diagnostic.c
parentf78ce0b72f5df10408865142b003e7ed13cecd2c (diff)
downloadgcc-7afff7cfb08e971723fee6a6b4ed508a3fdf9c26.zip
gcc-7afff7cfb08e971723fee6a6b4ed508a3fdf9c26.tar.gz
gcc-7afff7cfb08e971723fee6a6b4ed508a3fdf9c26.tar.bz2
Makefile.in: Update.
* Makefile.in: Update. * c-common.c: Include langhooks.h. (inline_forbidden_p): Use new hook. * diagnostic.c: Include langhooks.h. (format_with_decl, announce_function, default_print_error_function): Use new hook. * dwarf2out.c (dwarf2_name): Use new hook. * function.c: Include langhooks.h. (init_function_start): Use new hook. * langhooks-def.h (lhd_decl_printable_name): New. (LANGHOOKS_DECL_PRINTABLE_NAME): New. (LANGHOOKS_INITIALIZER): Update. * langhooks.c (lhd_decl_printable_name): New. * langhooks.h (struct lang_hooks): New hook. * toplev.c (decl_name, decl_printable_name): Remove. (open_dump_file): Use new hook. (process_options): Remove old hook. * tree.h (decl_printable_name): Remove. ada: * misc.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (gnat_init): Remove old hook. cp: * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. * cp-tree.h (lang_printable_name): Rename. * error.c (lang_decl_name): Use new hook. * lex.c (cxx_init): Remove old hook. * pt.c (tsubst_expr): Use new hook. * tree.c (lang_printable_name): Rename. f: * com.c (lang_printable_name): Rename. (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (ffe_init): Don't use old hook. java: * decl.c (start_java_method): Use new hook. * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (java_init): Remove old hook. objc: * objc-act.c (objc_init): Remove old hook. (objc_printable_name): Export. * objc-act.h (objc_printable_name): New. * objc-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. From-SVN: r51066
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index 4ff157d..7cb9c9b 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -34,6 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "toplev.h"
#include "intl.h"
#include "diagnostic.h"
+#include "langhooks.h"
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
@@ -867,7 +868,7 @@ format_with_decl (buffer, decl)
if (*p == '%') /* Print the name. */
{
const char *const n = (DECL_NAME (decl)
- ? (*decl_printable_name) (decl, 2)
+ ? (*lang_hooks.decl_printable_name) (decl, 2)
: _("((anonymous))"));
output_add_string (buffer, n);
while (*p)
@@ -1075,7 +1076,7 @@ announce_function (decl)
if (rtl_dump_and_exit)
verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
else
- verbatim (" %s", (*decl_printable_name) (decl, 2));
+ verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2));
fflush (stderr);
output_needs_newline (diagnostic_buffer) = 1;
record_last_error_function ();
@@ -1105,11 +1106,11 @@ default_print_error_function (context, file)
if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)
output_printf
((output_buffer *) context, "In member function `%s':",
- (*decl_printable_name) (current_function_decl, 2));
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2));
else
output_printf
((output_buffer *) context, "In function `%s':",
- (*decl_printable_name) (current_function_decl, 2));
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2));
}
output_add_newline ((output_buffer *) context);