This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/31541] [4.3 Regression] cannot take address of bit field
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2007 09:35:40 -0000
- Subject: [Bug middle-end/31541] [4.3 Regression] cannot take address of bit field
- References: <bug-31541-11706@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from hubicka at ucw dot cz 2007-06-22 09:35 -------
Subject: Re: [4.3 Regression] cannot take address of bit field
Hi,
I've experimented with this a bit - the problem is that the error is
produced during gimplification: gimplifier translates the expression
into the addr_expr form and later gimplifying the addr_expr it calls the
mark_addressable langhook that porudces the error.
It seems to me that this langhook call is unnecesary. Removing it
breaks since C++ is sometimes producing references to objects not having
addr_expr during gimplification, but it seems to me that adding just
generic code that takes gimple addr_expr and marks bit addressable (just
as aliasing does) instead the full blown langhook should just work?
THe typechecking in frontend should be enough to catch this sort of
syntax errors (when address is taken form something language prohibits).
Does this seem sane?
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31541