diff options
author | Alexandre Petit-Bianco <apbianco@cygnus.com> | 1999-12-01 13:06:10 +0000 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 1999-12-01 05:06:10 -0800 |
commit | b5b8a0e7794975bd86d0a30b7ffb28a9d9f2f6c1 (patch) | |
tree | d6bbc81cc6bcf885f15d10f3040bd2ceca286922 /gcc/java/parse.y | |
parent | e20440c1dde9050535ad0b69fd616ca079bb5bd0 (diff) | |
download | gcc-b5b8a0e7794975bd86d0a30b7ffb28a9d9f2f6c1.zip gcc-b5b8a0e7794975bd86d0a30b7ffb28a9d9f2f6c1.tar.gz gcc-b5b8a0e7794975bd86d0a30b7ffb28a9d9f2f6c1.tar.bz2 |
re GNATS gcj/97 (Internal compiler error)
Thu Nov 11 01:57:14 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (lookup_method_invoke): Use lang_printable_name to
reliably build the type name during error report. Fixes PR gcj/97.
From-SVN: r30739
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r-- | gcc/java/parse.y | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index cf5c863..07e6cfa 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -7561,6 +7561,7 @@ lookup_method_invoke (lc, cl, class, name, arg_list) tree atl = end_params_node; /* Arg Type List */ tree method, signature, list, node; const char *candidates; /* Used for error report */ + char *dup; /* Fix the arguments */ for (node = arg_list; node; node = TREE_CHAIN (node)) @@ -7610,14 +7611,13 @@ lookup_method_invoke (lc, cl, class, name, arg_list) method = make_node (FUNCTION_TYPE); TYPE_ARG_TYPES (method) = atl; signature = build_java_argument_signature (method); - parse_error_context (cl, "Can't find %s `%s(%s)' in class `%s'%s", + dup = strdup (lang_printable_name (class, 0)); + parse_error_context (cl, "Can't find %s `%s(%s)' in type `%s'%s", (lc ? "constructor" : "method"), - (lc ? - IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class))) : - IDENTIFIER_POINTER (name)), - IDENTIFIER_POINTER (signature), - IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class))), + (lc ? dup : IDENTIFIER_POINTER (name)), + IDENTIFIER_POINTER (signature), dup, (candidates ? candidates : "")); + free (dup); return NULL_TREE; } |