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]

Re: C++ PATCH: offsetof with multiple bases


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


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