This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH, related to ObjC++ support] Don't treat enumeration vals as lvalues (PR c++/41131)
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Aug 2009 15:03:13 -0700
- Subject: Re: [C++ PATCH, related to ObjC++ support] Don't treat enumeration vals as lvalues (PR c++/41131)
- References: <20090820214404.GP4462@tyan-ft48-01.lab.bos.redhat.com> <4A8DC7B7.1000308@redhat.com>
On Thu, Aug 20, 2009 at 3:01 PM, Jason Merrill<jason@redhat.com> wrote:
> On 08/20/2009 05:44 PM, Jakub Jelinek wrote:
>>
>> When Obj-C++ support was added, CONST_DECL handling has been added to
>> lvalue_p_1. ÂAs CONST_DECL are used in C++ land just for enumeration
>> values,
>> I assume it could be only because of objc_build_string_object which
>> creates
>> a CONST_DECL and creates ADDR_EXPR from it.
>
> What? ÂWhy is ObjC using CONST_DECL for that? ÂIt should be VAR_DECL, I'd
> think.
At one point it was a VAR_DECL but that caused issues from what I
remember. The Fortran front-end uses CONST_DECL in a similar way as
the objective-C front-end does ...
-- Pinski