re PR c++/49172 ([C++0x][constexpr] References should be declarable with constexpr)
authorJason Merrill <jason@redhat.com>
Wed, 22 Jun 2011 04:18:02 +0000 (00:18 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 22 Jun 2011 04:18:02 +0000 (00:18 -0400)
commitda7d921819a3e2ba17fd01d93fedf1cd4e2a5819
treeec54c4196b5464b246ae415206f98a796fd8bc2d
parent584dd700750ea6be613de4ae449726a08169eff6
re PR c++/49172 ([C++0x][constexpr] References should be declarable with constexpr)

PR c++/49172
* decl.c (cp_finish_decl): Adjust init_const_expr_p for refs.
(grokdeclarator): constexpr doesn't apply const for refs.
* parser.c (cp_parser_initializer_clause): Don't call
maybe_constant_value here.
* call.c (initialize_reference): Handle constexpr.

From-SVN: r175284
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/decl.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-ice2.C
gcc/testsuite/g++.dg/cpp0x/constexpr-ref1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-ref2.C [new file with mode: 0644]