re PR c++/85032 (Wrong non-constant condition for static assertion)
authorMarek Polacek <polacek@redhat.com>
Wed, 11 Apr 2018 13:10:16 +0000 (13:10 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 11 Apr 2018 13:10:16 +0000 (13:10 +0000)
commitfe0604d349c4d9eb18b17dd018383d591eed67c7
treed7f57dd15cf204ad849d48116e131e9bfa30ab5e
parent3c7b865120aa05bb23a825e46597c85279fc5761
re PR c++/85032 (Wrong non-constant condition for static assertion)

PR c++/85032
* constexpr.c (potential_constant_expression_1): Consider conversions
from classes to literal types potentially constant.

* g++.dg/cpp0x/pr51225.C: Adjust error message.
* g++.dg/cpp1z/constexpr-if21.C: New test.

From-SVN: r259318
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr51225.C
gcc/testsuite/g++.dg/cpp1z/constexpr-if21.C [new file with mode: 0644]