aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1996-12-14 09:17:22 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1996-12-14 09:17:22 +0000
commita46d92a73667cff1203670ca5584757887f9c553 (patch)
tree92db92a8af8816651b00174b62398539acfdf013 /gdb/c-exp.y
parent93f8f531b068d20ee96799df210b786ef0b0c657 (diff)
downloadfsf-binutils-gdb-a46d92a73667cff1203670ca5584757887f9c553.zip
fsf-binutils-gdb-a46d92a73667cff1203670ca5584757887f9c553.tar.gz
fsf-binutils-gdb-a46d92a73667cff1203670ca5584757887f9c553.tar.bz2
* c-exp.y (qualified_name): Replace explicit check for valid
destructor name with call to destructor_name_p. * c-lang.h, c-typeprint.c (cp_type_print_method_args): Removed, no longer needed. * c-typeprint.c (c_type_print_varspec_prefix, c_type_print_base): Replace remaining fprintf_unfiltered calls with their filtered variant. (c_type_print_base): Do not print return type for destructors from template classes. Replace cp_type_print_method_args with cplus_demangle call to get consistent type output for stubbed and unstubbed methods. * cp-valprint.c (cp_print_class_method): Replace cp_type_print_method_args with cplus_demangle call to get consistent type output for stubbed and unstubbed methods. * gdbtypes.c, gdbtypes.h (get_destructor_fn_field): New function to find the destructor field indices for a type. * gdbtypes.h (struct type): Clarify comments for vptr_basetype and arg_types fields. (struct fn_field): Remove args field, no longer used. * symtab.c (decode_line_1), valops.c (value_struct_elt, check_field_in): Use get_destructor_fn_field to find the destructor field indices instead of assuming that the compiler passes the member function fields in a specific order. * symtab.c (find_methods): Pass NULL instead of SYMBOL_BLOCK_VALUE to lookup_symbol. (list_symbol): Replace cp_type_print_method_args with cplus_demangle call in zapped out code and explain why this code is zapped out.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r--gdb/c-exp.y9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 0572e12..d7d4235 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -1,5 +1,5 @@
/* YACC parser for C expressions, for GDB.
- Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994
+ Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 1996
Free Software Foundation, Inc.
This file is part of GDB.
@@ -604,15 +604,14 @@ qualified_name: typebase COLONCOLON name
error ("`%s' is not defined as an aggregate type.",
TYPE_NAME (type));
- if (!STREQ (type_name_no_tag (type), $4.ptr))
- error ("invalid destructor `%s::~%s'",
- type_name_no_tag (type), $4.ptr);
-
tmp_token.ptr = (char*) alloca ($4.length + 2);
tmp_token.length = $4.length + 1;
tmp_token.ptr[0] = '~';
memcpy (tmp_token.ptr+1, $4.ptr, $4.length);
tmp_token.ptr[tmp_token.length] = 0;
+
+ /* Check for valid destructor name. */
+ destructor_name_p (tmp_token.ptr, type);
write_exp_elt_opcode (OP_SCOPE);
write_exp_elt_type (type);
write_exp_string (tmp_token);