re PR c++/65642 ([C++11] GCC rejects valid constant expression)
authorMarek Polacek <polacek@redhat.com>
Thu, 2 Apr 2015 16:51:27 +0000 (16:51 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 2 Apr 2015 16:51:27 +0000 (16:51 +0000)
commit894bec688558a3f8d9a5398df66adb4d45f6fa26
tree2c4f955abf98010c78d3a09f5436b8018d6dbdfd
parent37978db4a756f65b2e787837b273f773ec4aeae7
re PR c++/65642 ([C++11] GCC rejects valid constant expression)

PR c++/65642
* constexpr.c (cxx_eval_pointer_plus_expression): Call
cxx_eval_constant_expression on the first operand.

* g++.dg/cpp0x/constexpr-fold1.C: New test.
* g++.dg/cpp0x/constexpr-fold2.C: New test.

From-SVN: r221843
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-fold1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-fold2.C [new file with mode: 0644]