Expand PTRMEM_CST only when necessary.
authorJason Merrill <jason@redhat.com>
Tue, 20 Oct 2015 02:48:43 +0000 (22:48 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 20 Oct 2015 02:48:43 +0000 (22:48 -0400)
commitdcdbc004d531b43e0583f8ac18def1474d64dc05
treea3ee54d747eb001c8c79a026521c8920f2221b27
parent13b380a3257189e5232010c982b8c691b348482c
Expand PTRMEM_CST only when necessary.

* constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
only when necessary.
(cxx_eval_component_reference): Like here.
* decl2.c (lower_var_init): And here.
(c_parse_final_cleanups): Call it.
* typeck2.c (digest_init_r): Not here.
* decl.c (complete_vars): Or here.
(cp_finish_decl): Add local statics to symbol table.

From-SVN: r229018
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/typeck2.c