diff options
author | Richard Stallman <rms@gnu.org> | 1992-09-10 05:33:47 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-09-10 05:33:47 +0000 |
commit | 6152f87688139edd35e573d3fc304f05aea10766 (patch) | |
tree | b7bd8a092be8a221d1a6959a4534efab93bed4a9 /gcc/c-common.c | |
parent | db69cfcb78fb580a805a52342d30d631fed15e40 (diff) | |
download | gcc-6152f87688139edd35e573d3fc304f05aea10766.zip gcc-6152f87688139edd35e573d3fc304f05aea10766.tar.gz gcc-6152f87688139edd35e573d3fc304f05aea10766.tar.bz2 |
(declare_function_name): Allow for anonymous function.
From-SVN: r2095
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |