gcc/gcc ChangeLog stor-layout.c tree.h cp/Chan ...
mmitchel@gcc.gnu.org
mmitchel@gcc.gnu.org
Mon Sep 30 09:52:00 GMT 2002
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2002-09-30 09:52:21
Modified files:
gcc : ChangeLog stor-layout.c tree.h
gcc/cp : ChangeLog class.c cp-tree.h decl.c expr.c
init.c method.c pt.c search.c tree.c typeck.c
typeck2.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/abi: empty7.C
gcc/testsuite/g++.dg/init: pm2.C
Log message:
* store-layout.c (finish_record_layout): Add free_p parameter.
(layout_type): Pass it.
* tree.h (finish_record_layout): Update prototype.
* class.c (walk_subobject_offsets): Correct the calculation of
offsets for virtual bases. Correct the counting of array
elements.
(layout_nonempty_base_or_field): Simplify. Correct the
calculation of offsets to be propagated through the binfo
hierarchy.
(build_base_field): Avoid creating a FIELD_DECL for empty bases.
Add the FIELD_DECL to TYPE_FIELDS.
(build_base_fields): Adjust accordingly.
(layout_virtual_bases): Use build_base_field.
(end_of_class): Return a tree, not an integer.
(warn_about_ambiguous_direct_bases): Rename to ...
(warn_about_ambiguous_bases): ... this.
(include_empty_classes): New function.
(layout_class_type): Create an alternative version of the type to
be used when as a base class type. Do not call
finish_record_layout until we are done laying out the class.
* cp-tree.h (lang_type_class): Remove size, size_unit. Add
as_base.
(CLASSTYPE_SIZE): Reimplement.
(CLASSTYPE_SIZE_UNIT): Likewise.
(CLASSTYPE_ALIGN): Likweise.
(CLASSTYPE_USER_ALIGN): Likewise.
(CLASSTYPE_AS_BASE): New macro.
(DECL_INITIALIZED_P): Likewise.
(extract_init): Remove prototype.
(build_forced_zero_init): Rename to ...
(build_zero_init): ... this.
(force_store_init_value): Remove.
* decl.c (obscure_complex_init): Remove.
(duplicate_decls): Copy DECL_INITIALIZED_P.
(check_initializer): Do not leave junk in DECL_INITIAL.
(cp_finish_decl): Handle zero-initialization of entities with
static storage duration.
* expr.c (extract_init): Remove.
* init.c (build_forced_zero_init): Remove.
(build_zero_init): New function.
(build_default_init): Use it.
(build_field_list): Skip FIELD_DECLs for base subobjects.
(push_base_cleanups): Likewise.
* method.c (do_build_assign_ref): Likewise.
(synthesize_exception_spec): Likewise.
* pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
(regenerate_decl_from_template): To not set DECL_INITIAL for a
static data member whose initialization took place in its class.
(instantiate_decl): Do not pass an initializer to cp_finish_decl
in that situation.
* search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
(dfs_unuse_fields): Likewise.
* tree.c (pod_type_p): Handle error_mark_node.
(zero_init_p): Likewise.
* typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
subobjects.
* typeck2.c (store_init_value): Remove #if 0'd code.
(force_store_init_value): Remove.
(process_init_constructor): Use build_zero_init.
* g++.dg/abi/empty7.C: New test.
* g++.dg/init/pm2.C: Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.15574&r2=1.15575
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/stor-layout.c.diff?cvsroot=gcc&r1=1.131&r2=1.132
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.356&r2=1.357
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.2971&r2=1.2972
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.469&r2=1.470
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.753&r2=1.754
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.937&r2=1.938
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/expr.c.diff?cvsroot=gcc&r1=1.65&r2=1.66
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcc&r1=1.292&r2=1.293
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/method.c.diff?cvsroot=gcc&r1=1.230&r2=1.231
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.618&r2=1.619
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/search.c.diff?cvsroot=gcc&r1=1.238&r2=1.239
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&r1=1.301&r2=1.302
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.429&r2=1.430
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck2.c.diff?cvsroot=gcc&r1=1.128&r2=1.129
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2107&r2=1.2108
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/abi/empty7.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/pm2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
More information about the Gcc-cvs
mailing list