This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: Fix PR 13275
On Tue, Dec 16, 2003 at 11:34:44PM +0100, Gabriel Dos Reis wrote:
> Yup. I'm surprised it is implemented that way. I would think the
> obvious __offsetof__(type, member) would be the way to go...
Except this means doing very ugly things with the grammar.
I've been looking at this for tree-ssa because I want to get rid of
the nasty bits in build_unary_op for ADDR_EXPR that lower array and
structure member references to pointer arithmetic too early.
Mark's solution is quite a good workaround, IMO. Wish I'd thought
of it. ;-) I'd really like to have this same extension for C.
Any chance you could add the couple of lines necessary to accept
and discard this new operator to the C front end for mainline?
At some later point we can actually fix the integer constant expr
issues that are rampant...
r~