[Bug c++/124181] constexpr function with null statement throws compile error in C++11, but should be ok by specification
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 20 20:16:08 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124181
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(void) x; is not a null statement.
https://eel.is/c++draft/stmt.expr#1.sentence-4
Only ; alone or say [[whatever::whateverelse]] ; is a null statement.
More information about the Gcc-bugs
mailing list