From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23544 invoked by alias); 4 Mar 2005 23:30:44 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22465 invoked by alias); 4 Mar 2005 23:30:04 -0000 Date: Fri, 04 Mar 2005 23:30:00 -0000 Message-ID: <20050304233004.22464.qmail@sourceware.org> From: "mark at codesourcery dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050220111234.20103.falk@debian.org> References: <20050220111234.20103.falk@debian.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/20103] [4.0/4.1 regression] ICE in create_tmp_var with C99 style struct initializer X-Bugzilla-Reason: CC X-SW-Source: 2005-03/txt/msg00595.txt.bz2 List-Id: ------- Additional Comments From mark at codesourcery dot com 2005-03-04 23:29 ------- Subject: Re: [PR c++/20103] failure to gimplify constructors for addressable types Alexandre Oliva wrote: > On Mar 3, 2005, Andrew Pinski wrote: > > >>I think this is the wrong approach. The front-end and not >>the gimplifier should be creating these temporaries, I mentioned >>this already in the bug. > > > How about this? > > I tried with the TARGET_EXPR by itself, but it failed to be recognized > as an lvalue, so I introduced the compound expr. Introducing a TARGET_EXPR makes sense to me. > Testing on x86_64-linux-gnu. Ok to install if it passes? > + foo ((B){x}); I don't think (B){x} should be an lvalue, C99 notwithstanding. B(3) is not be an lavalue; I don't see why "(B){x}" should be. Conceptually, the compound-literal syntax is just a way of invoking an imaginary constuctor that has an argument corresponding to each non-static data member. Has there been any discussion of this in the ISO committee? Or prior are in other compilers? Including previous versions of G++? (These are not rhetorical questions; I really don't know.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20103