diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-07-03 18:13:44 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-07-03 18:13:44 +0000 |
commit | 8d245821a2f3c28b71bf0958c90cf7fed6c9871d (patch) | |
tree | 7a1b74d528559e87eba7c56bcafd46a0a8dea100 /gcc/cp/mangle.c | |
parent | ee41cff421132bb2891a4ad51fae0f83ffcfe087 (diff) | |
download | gcc-8d245821a2f3c28b71bf0958c90cf7fed6c9871d.tar.gz |
call.c (build_scoped_method_call): Use convert_to_void.
* call.c (build_scoped_method_call): Use convert_to_void.
(build_method_call): Likewise.
* class.c (check_field_decls): Remove dead code.
* cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
* decl2.c (grok_array_decl): Remove dead code.
(arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
as pointer-to-member representation.
* init.c (build_offset_ref): Tidy.
(build_vec_delete_1): Use convert_to_void.
* mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
as pointer-to-member representation.
From-SVN: r68895
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r-- | gcc/cp/mangle.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 833220cb3e2..27f5c7faae3 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -1441,7 +1441,9 @@ write_type (tree type) /* See through any typedefs. */ type = TYPE_MAIN_VARIANT (type); - switch (TREE_CODE (type)) + if (TYPE_PTRMEM_P (type)) + write_pointer_to_member_type (type); + else switch (TREE_CODE (type)) { case VOID_TYPE: case BOOLEAN_TYPE: @@ -1483,15 +1485,8 @@ write_type (tree type) break; case POINTER_TYPE: - /* A pointer-to-member variable is represented by a POINTER_TYPE - to an OFFSET_TYPE, so check for this first. */ - if (TYPE_PTRMEM_P (type)) - write_pointer_to_member_type (type); - else - { - write_char ('P'); - write_type (TREE_TYPE (type)); - } + write_char ('P'); + write_type (TREE_TYPE (type)); break; case REFERENCE_TYPE: @@ -1514,10 +1509,6 @@ write_type (tree type) (TI_ARGS (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (type))); break; - case OFFSET_TYPE: - write_pointer_to_member_type (build_pointer_type (type)); - break; - case VECTOR_TYPE: write_string ("U8__vector"); write_type (TREE_TYPE (type)); |