https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91953

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jason Merrill
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:56943ab07c0c0e6878806adf7372dccad84b78d7

commit r8-10671-g56943ab07c0c0e6878806adf7372dccad84b78d7
Author: Jason Merrill <ja...@redhat.com>
Date:   Mon Mar 2 14:42:47 2020 -0500

    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.
  • [Bug c++/91953] [8 Regression] ... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to