This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: offsetof with multiple bases
- To: nathan at cs dot bris dot ac dot uk
- Subject: Re: C++ PATCH: offsetof with multiple bases
- From: Jason Merrill <jason at cygnus dot com>
- Date: 11 May 1999 11:32:18 -0700
- Cc: egcs-patches at egcs dot cygnus dot com
- References: <373840C7.6CFD2E3@acm.org>
Since this is an extension, it must generate a pedwarn when used.
Weakening the interface to convert_pointer_to_real bothers me; converting
(foo*)0 to (bar*) must always produce (bar*)0. Rather than do that, I'd
prefer that you change it in build_component_ref to be relative to some
other value -- say, 1 -- and adjust afterward.
Also, your last chunk would break code that constructs an object at a
specific address, to interface with hardware. Unlikely, but I don't see a
reason to break it. This stuff should be diagnosed in build_component_ref
instead.
Jason