diff options
author | Jason Merrill <jason@redhat.com> | 2020-03-02 14:42:47 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-12-09 15:50:59 -0500 |
commit | 56943ab07c0c0e6878806adf7372dccad84b78d7 (patch) | |
tree | 977cf3434dcbe231f4cc97ea1e90817b913f6667 /gcc/tree-ssa-loop-unswitch.c | |
parent | fab88d42ed2f2c8f013689aae7b55d08da538837 (diff) | |
download | gcc-56943ab07c0c0e6878806adf7372dccad84b78d7.zip gcc-56943ab07c0c0e6878806adf7372dccad84b78d7.tar.gz gcc-56943ab07c0c0e6878806adf7372dccad84b78d7.tar.bz2 |
c++: Allow parm of empty class type in constexpr.
Since copying a class object is defined in terms of the copy constructor,
copying an empty class is OK even if it would otherwise not be usable in a
constant expression.
gcc/cp/ChangeLog
PR c++/91953
* constexpr.c (potential_constant_expression_1) [PARM_DECL]: Allow
empty class type.
gcc/testsuite/ChangeLog:
PR c++/91953
* g++.dg/cpp1z/constexpr-if12.C: Remove error.
* g++.dg/cpp0x/constexpr-empty14.C: New test.
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
0 files changed, 0 insertions, 0 deletions