[Bug c++/93257] consteval functions returning 'void' are rejected when called
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 15 20:15:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93257
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |10.0
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:596334fa040094c772965ff1998d171fe3e00348
commit r10-5988-g596334fa040094c772965ff1998d171fe3e00348
Author: Jason Merrill <jason@redhat.com>
Date: Wed Jan 15 14:45:24 2020 -0500
PR c++/93257 - consteval void function.
A prvalue can have void type, and if it doesn't do anything prohibited in a
constant expression, it's vacuously constant.
* constexpr.c (verify_constant): Allow void_node.
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
More information about the Gcc-bugs
mailing list