This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH rs6000] (small C++ patch) Add intrinsics for the new vec_* specified by the C/C++ Language Extension for the CBEA


Andrew_Pinski@PlayStation.Sony.Com wrote:
> Mark Mitchell <mark@codesourcery.com> wrote on 09/30/2008 07:59:33 PM:
> 
>> Andrew Pinski wrote:
>>
>>> I had to add some small support for C++ to support
>>> COMPOUND_LITERAL_EXPR to say it is a lvalue.
>>> cp/ChangeLog:
>>> * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
>> The C++ change is OK if compound literals are lvalues in C.  I'm
>> slightly surprised that they are, but if so, it makes sense to treat
>> them the same way in C++.
> 
> I wonder why you are surprised they are lvalues for C, they were designed 
> (as I understand it) to provide an anonymous variable.

I just wasn't sure they were lvalues; there are situations where a
structure is not an lvalue.  I guess you can just color me dumb.

Thanks for the reference; in that case, the C++ patch is OK.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]