X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fvalops.c;h=4b84eba886d9f04afb930fb2f35060ffc5fecb92;hb=4753d33b404f07e749f648c57ae61e3984d40029;hp=c09e4fd0fc32768c2040b2b42560571bd570c870;hpb=9c1877ead06db18e19614a598d1e280acb97e971;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/valops.c b/gdb/valops.c index c09e4fd0fc..4b84eba886 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -735,7 +735,7 @@ value_dynamic_cast (struct type *type, struct value *arg) && TYPE_CODE (resolved_type) != TYPE_CODE_REF) error (_("Argument to dynamic_cast must be a pointer or reference type")); if (TYPE_CODE (TYPE_TARGET_TYPE (resolved_type)) != TYPE_CODE_VOID - && TYPE_CODE (TYPE_TARGET_TYPE (resolved_type)) != TYPE_CODE_CLASS) + && TYPE_CODE (TYPE_TARGET_TYPE (resolved_type)) != TYPE_CODE_STRUCT) error (_("Argument to dynamic_cast must be pointer to class or `void *'")); class_type = check_typedef (TYPE_TARGET_TYPE (resolved_type)); @@ -748,7 +748,7 @@ value_dynamic_cast (struct type *type, struct value *arg) if (TYPE_CODE (arg_type) == TYPE_CODE_PTR) { arg_type = check_typedef (TYPE_TARGET_TYPE (arg_type)); - if (TYPE_CODE (arg_type) != TYPE_CODE_CLASS) + if (TYPE_CODE (arg_type) != TYPE_CODE_STRUCT) error (_("Argument to dynamic_cast does " "not have pointer to class type")); } @@ -761,7 +761,7 @@ value_dynamic_cast (struct type *type, struct value *arg) } else { - if (TYPE_CODE (arg_type) != TYPE_CODE_CLASS) + if (TYPE_CODE (arg_type) != TYPE_CODE_STRUCT) error (_("Argument to dynamic_cast does not have class type")); }