This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH: Empty classes, yet again




--On Monday, October 21, 2002 11:06:42 PM +0200 Krister Walfridsson <cato@df.lth.se> wrote:


2002-10-14  Mark Mitchell  <mark@codesourcery.com>

	* class.c (check_field_decls): Remove empty_p parameter.  Instead,
	clear CLASSTYPE_EMPTY_P.
	(build_base_field): Likewise.
	(build_base_fields): Likewise.
	(check_bases_and_members): Likewise.
	(create_vtbl_ptr): Likewise.
	(layout_class_type): Likewise.  Ensure that empty classes have
	size zero when used as base classes in the 3.2 ABI.
	(finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
	CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
	parameter.
	(is_empty_class): Correct definition when using post-3.2 ABI.
	* cp-tree.h (lang_type_class): Add empty_p.
	(CLASSTYPE_EMPTY_P): New macro.
FWIW. This change introduces a regression for arm-unknown-netbsd1.5Y:

   FAIL: g++.abi/vbase8-9.C  Execution test

(the test dumps core with a segmentation fault when run.)
How disturbing.

During the construction of which object?  (Try removing lines
from the end of main until you no longer get an error.)

Thanks,

--
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]