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



Jakub Jelinek <jakub at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |jason at gcc dot gnu.org



--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-28 
15:15:11 UTC ---

In cp_parser_constant_expression when we call cp_parser_assignment_expression

on the initializer, it returns

((char *) __builtin_memcpy ((char *) &str, (const char *) "Hello", 6);, 5)

As this is C++11, we call potential_rvalue_constant_expression which returns

true (the call in the COMPOUND_EXPR is builtin, and all its arguments are

pontential_rvalue_constant_expression arguments).  I bet somewhere later on we

see that it is const and ignore the TREE_SIDE_EFFECTS initializer.

Reply via email to