This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13275] [3.4 regression] Implementation of offsetof macro
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Dec 2003 01:31:26 -0000
- Subject: [Bug c++/13275] [3.4 regression] Implementation of offsetof macro
- References: <20031203003343.13275.jbrandmeyer@earthlink.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2003-12-04 01:31 -------
Subject: Re: [3.4 regression] Implementation of offsetof macro
"nathan at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Consider that TYPE might be a template or dependent type, and you
| need to know that when parsing the .member bit.
Yes, but then, it is not really different from sizeof T::member.
__offsetof__(T, member) does record the fact that it is dependent by
the very presence of a dependent T as operand.
| It is simplest and most
| robust to make the construct look somewhat like obj.member
I don't think it is more robust. And I'm not convinced that it is
simpler, because we still need to get a constant expression out of
that, and when folding we will be basically destructuring obj.member
into parts -- to get something analogue to (type, member), which is
where started from.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13275