From: dnovillo Date: Fri, 12 Nov 1999 19:59:01 +0000 (+0000) Subject: * init.c (init_init_processing): Re-instated Nov 11 patch after X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=49f644e4d358f369d410fbaeea2625c5d4a04838;p=thirdparty%2Fgcc.git * init.c (init_init_processing): Re-instated Nov 11 patch after approval. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30510 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 646c6e3a8ddb..42396048f3e7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +Fri Nov 12 12:56:32 MST 1999 Diego Novillo + + * init.c (init_init_processing): Re-instated Nov 11 patch after + approval. + Fri Nov 12 10:42:02 MST 1999 Diego Novillo * init.c (init_init_processing): Undo patch from Nov 11, 1999. diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 07c45f46cb69..117c814b5489 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -66,8 +66,12 @@ void init_init_processing () BI_header_type = make_lang_type (RECORD_TYPE); nelts_identifier = get_identifier ("nelts"); fields[0] = build_lang_decl (FIELD_DECL, nelts_identifier, sizetype); + + /* Use the biggest alignment supported by the target to prevent operator + new from returning misaligned pointers. */ + TYPE_ALIGN (BI_header_type) = BIGGEST_ALIGNMENT; finish_builtin_type (BI_header_type, "__new_cookie", fields, - 0, double_type_node); + 0, BI_header_type); BI_header_size = size_in_bytes (BI_header_type); ggc_add_tree_root (&BI_header_type, 1);