From 6152f87688139edd35e573d3fc304f05aea10766 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Thu, 10 Sep 1992 05:33:47 +0000 Subject: [PATCH] (declare_function_name): Allow for anonymous function. From-SVN: r2095 --- gcc/c-common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/c-common.c b/gcc/c-common.c index f647b40..bf76110 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -42,7 +42,11 @@ declare_function_name () char *kind = "function"; if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE) kind = "method"; - name = IDENTIFIER_POINTER (DECL_NAME (current_function_decl)); + /* Allow functions to be nameless (such as artificial ones). */ + if (DECL_NAME (current_function_decl)) + name = IDENTIFIER_POINTER (DECL_NAME (current_function_decl)); + else + name = ""; printable_name = (*decl_printable_name) (current_function_decl, &kind); } -- 2.7.4