diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-12-16 09:40:03 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-12-16 09:40:03 +0000 |
commit | 3dae587b3725acf5f36e6952810a84fa817702cc (patch) | |
tree | e7a4831ca7b46e08d1f5bc38c1d4f221aa7cfbbe /gcc/cp/cp-objcp-common.h | |
parent | 7874b640075a793f860a5df1c80f1ac384582424 (diff) | |
download | gcc-3dae587b3725acf5f36e6952810a84fa817702cc.tar.gz |
2016-12-16 Richard Biener <rguenther@suse.de>
PR c++/71694
* langhooks-def.h (lhd_unit_size_without_reusable_padding): Declare.
(LANG_HOOKS_UNIT_SIZE_WITHOUT_REUSABLE_PADDING): Define.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Adjust.
* langhooks.h (struct lang_hooks_for_types): Add
unit_size_without_reusable_padding.
* langhooks.c (lhd_unit_size_without_reusable_padding): New.
* stor-layout.c (finish_bitfield_representative): Use
unit_size_without_reusable_padding langhook to decide on the
last representatives size.
cp/
* cp-objcp-common.h (cp_unit_size_without_reusable_padding): Declare.
(LANG_HOOKS_UNIT_SIZE_WITHOUT_REUSABLE_PADDING): Define.
* cp-objcp-common.c (cp_unit_size_without_reusable_padding): New.
* g++.dg/pr71694.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243738 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-objcp-common.h')
-rw-r--r-- | gcc/cp/cp-objcp-common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h index 65ac95c2ee1..f0e45c58f21 100644 --- a/gcc/cp/cp-objcp-common.h +++ b/gcc/cp/cp-objcp-common.h @@ -30,6 +30,7 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t, extern int cp_decl_dwarf_attribute (const_tree, int); extern int cp_type_dwarf_attribute (const_tree, int); extern void cp_common_init_ts (void); +extern tree cp_unit_size_without_reusable_padding (tree); /* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c, @@ -137,6 +138,9 @@ extern void cp_common_init_ts (void); #define LANG_HOOKS_DECL_DWARF_ATTRIBUTE cp_decl_dwarf_attribute #undef LANG_HOOKS_TYPE_DWARF_ATTRIBUTE #define LANG_HOOKS_TYPE_DWARF_ATTRIBUTE cp_type_dwarf_attribute +#undef LANG_HOOKS_UNIT_SIZE_WITHOUT_REUSABLE_PADDING +#define LANG_HOOKS_UNIT_SIZE_WITHOUT_REUSABLE_PADDING cp_unit_size_without_reusable_padding + #undef LANG_HOOKS_OMP_PREDETERMINED_SHARING #define LANG_HOOKS_OMP_PREDETERMINED_SHARING cxx_omp_predetermined_sharing #undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR |