From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15711 invoked by alias); 22 Jun 2007 09:35:52 -0000 Received: (qmail 15645 invoked by alias); 22 Jun 2007 09:35:40 -0000 Date: Fri, 22 Jun 2007 09:35:00 -0000 Message-ID: <20070622093540.15644.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/31541] [4.3 Regression] cannot take address of bit field In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hubicka at ucw dot cz" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg02012.txt.bz2 ------- 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