This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
Re: gcj/97: Internal compiler error
- To: apbianco at cygnus dot com
- Subject: Re: gcj/97: Internal compiler error
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: 11 Nov 1999 10:16:01 -0000
- Cc: java-prs at sourceware dot cygnus dot com,
- Reply-To: Alexandre Petit-Bianco <apbianco at cygnus dot com>
The following reply was made to PR gcj/97; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: joerg.brunsmann@fernuni-hagen.de, java-gnats@sourceware.cygnus.com
Cc:
Subject: Re: gcj/97: Internal compiler error
Date: Thu, 11 Nov 1999 02:00:26 -0800 (PST)
joerg.brunsmann@fernuni-hagen.de writes:
> Access to the length attribute via method call gives:
Oops. How about this patch?
./A
Thu Nov 11 01:57:14 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (lookup_method_invoke): Use lang_printable_name to build
the type name during error report.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.118
diff -u -p -r1.118 parse.y
--- parse.y 1999/11/09 20:30:57 1.118
+++ parse.y 1999/11/11 09:56:20
@@ -7549,6 +7549,7 @@ lookup_method_invoke (lc, cl, class, nam
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))
@@ -7598,14 +7599,13 @@ lookup_method_invoke (lc, cl, class, nam
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;
}