summaryrefslogtreecommitdiffstats
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-04 06:28:54 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-04 06:28:54 +0000
commit0d1edf04e982ae14b042e5079feda4ffd334b527 (patch)
treed868f5fe0152e84a5178c7af2fe9301e56e71e30 /gcc/cp/decl.c
parentce489707465ef703b6123649d5b11ab65e06bc95 (diff)
downloadppe42-gcc-0d1edf04e982ae14b042e5079feda4ffd334b527.tar.gz
ppe42-gcc-0d1edf04e982ae14b042e5079feda4ffd334b527.zip
* cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
(pfn_vflag_identifier): Define. Update comment about layout of pointer functions. (build_ptrmemfunc1): Update prototype. (expand_ptrmemfunc_cst): Update prototype. * decl.c (initialize_predefined_identifiers): Initialize pfn_vflag_identifier. (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add an extra field to the type. * expr.c (cplus_expand_constant): Pass 'flag' between expand_ptrmemfunc_cst and build_ptrmemfunc1. * typeck.c (get_member_function_from_ptrfunc): When FUNCTION_BOUNDARY < 16, look at additional field to determine if a pointer-to-member is a real pointer or a vtable offset. (build_ptrmemfunc1): Add new parameter to contain extra field. (build_ptrmemfunc): Pass the extra field around. (expand_ptrmemfunc_cst): Add new parameter to return extra field. (pfn_from_ptrmemfunc): Ignore the extra field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41824 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 54d84f47ddd..b04206d0f68 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6303,6 +6303,7 @@ initialize_predefined_identifiers ()
{ "nelts", &nelts_identifier, 0 },
{ THIS_NAME, &this_identifier, 0 },
{ VTABLE_PFN_NAME, &pfn_identifier, 0 },
+ { "__vflag", &pfn_vflag_identifier, 0 },
{ "__pfn_or_delta2", &pfn_or_delta2_identifier, 0 },
{ "_vptr", &vptr_identifier, 0 },
{ "__vtt_parm", &vtt_parm_identifier, 0 },
@@ -9156,7 +9157,14 @@ build_ptrmemfunc_type (type)
fields[0] = build_decl (FIELD_DECL, pfn_identifier, type);
fields[1] = build_decl (FIELD_DECL, delta_identifier,
delta_type_node);
- finish_builtin_type (t, "__ptrmemfunc_type", fields, 1, ptr_type_node);
+ if (FUNCTION_BOUNDARY < 16)
+ {
+ fields[2] = build_decl (FIELD_DECL, pfn_vflag_identifier,
+ char_type_node);
+ finish_builtin_type (t, "__ptrmemfunc_type", fields, 2, ptr_type_node);
+ } else {
+ finish_builtin_type (t, "__ptrmemfunc_type", fields, 1, ptr_type_node);
+ }
/* Zap out the name so that the back-end will give us the debugging
information for this anonymous RECORD_TYPE. */
OpenPOWER on IntegriCloud