Fix empty class parameters with constexpr.
authorJason Merrill <jason@redhat.com>
Tue, 9 Aug 2016 04:33:42 +0000 (00:33 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 9 Aug 2016 04:33:42 +0000 (00:33 -0400)
commit7dc2b4a235481acda5ae9e51f4cc0401b1fb192f
treeaf1d5b910d980f8803fa3cb95c390dfbf608337e
parentb08e71f9e8afbdf264d159627760aa2bf8a8ca1a
Fix empty class parameters with constexpr.

PR c++/67131
* class.c (is_really_empty_class): Call complete_type.
* constexpr.c (cxx_eval_constant_expression): Check
is_really_empty_class.
(potential_constant_expression_1): Likewise.  Check for error type.

From-SVN: r239267
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/constexpr.c
gcc/testsuite/g++.dg/cpp0x/constexpr-empty12.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-empty13.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/var-templ42.C