+2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
+
+ * parse.y (do_resolve_class): Fix infinite recursion.
+
2002-03-29 Tom Tromey <tromey@redhat.com>
* parse.y (check_inner_circular_reference): Ignore incomplete
applicable and use the matching DECL instead. */
if (!decl_result && QUALIFIED_P (TYPE_NAME (class_type)))
{
- tree name = TYPE_NAME (class_type);
char *separator;
+ tree name = TYPE_NAME (class_type);
+ char *namebuffer = alloca (IDENTIFIER_LENGTH (name) + 1);
+
+ strcpy (namebuffer, IDENTIFIER_POINTER (name));
+
do {
/* Reach the last '.', and if applicable, replace it by a `$' and
see if this exists as a type. */
- if ((separator = strrchr (IDENTIFIER_POINTER (name), '.')))
+ if ((separator = strrchr (namebuffer, '.')))
{
- int c = *separator;
*separator = '$';
- name = get_identifier (IDENTIFIER_POINTER (name));
- *separator = c;
+ name = get_identifier (namebuffer);
decl_result = IDENTIFIER_CLASS_VALUE (name);
}
} while (!decl_result && separator);