This is the mail archive of the gcc-bugs@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]

[Bug c++/41131] [4.3/4.4/4.5 Regression] non-lvalue in unary `&' wrongly accepted



------- Comment #3 from jakub at gcc dot gnu dot org  2009-08-20 19:26 -------
Created an attachment (id=18407)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18407&action=view)
gcc45-pr41131.patch

I guess objc_build_string_object is the reason, except for that function
CONST_DECLs are only used for enumeration values in C/C++/ObjC/ObjC++.  And
that function creates a CONST_DECL and builds ADDR_EXPR on it, thus without
that lvalue_p_1 change I guess it would die with error.
Fortunately this CONST_DECL has TREE_STATIC set, while enumeration vals don't.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41131


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