This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
g++ exception_support.h has original_value, but not the compiler
- To: gcc-bugs at gcc dot gnu dot org
- Subject: g++ exception_support.h has original_value, but not the compiler
- From: Brendan Kehoe <brendan at zen dot org>
- Date: Sun, 4 Feb 2001 12:39:29 +0000
- Reply-To: brendan at zen dot org (Brendan Kehoe)
Unless it's been known to not matter (and thus would call for a suitable
comment in the header), the type struct cp_eh_info in
libstdc++-v3/libsupc++/exception_support.h has an `original_value' pointer as
its final field:
struct cp_eh_info
{
__eh_info eh_info;
void *value;
void *type;
cleanup_fn cleanup;
bool caught;
cp_eh_info *next;
long handlers;
void *original_value;
};
However, the cp_eh_info constructed inside gcc/cp/except.c does not include
that one, finishing at the "handlers" member:
t = make_aggr_type (RECORD_TYPE);
fields[0] = build_decl (FIELD_DECL,
get_identifier ("eh_info"), t1);
fields[1] = build_decl (FIELD_DECL, get_identifier ("value"),
ptr_type_node);
fields[2] = build_decl (FIELD_DECL, get_identifier ("type"),
ptr_type_node);
fields[3] = build_decl
(FIELD_DECL, get_identifier ("cleanup"),
build_pointer_type (build_function_type
(ptr_type_node, tree_cons
(NULL_TREE, ptr_type_node, void_list_node))));
fields[4] = build_decl (FIELD_DECL, get_identifier ("caught"),
boolean_type_node);
fields[5] = build_decl (FIELD_DECL, get_identifier ("next"),
build_pointer_type (t));
fields[6] = build_decl
(FIELD_DECL, get_identifier ("handlers"), long_integer_type_node);
/* N.B.: The fourth field LEN is expected to be
the number of fields - 1, not the total number of fields. */
finish_builtin_type (t, "cp_eh_info", fields, 6, ptr_type_node);
Deliberate, or accidental?
Hope this helps,
B