[Bug c++/108218] [12/13 Regression] Constant arguments in the new expression is not checked in unevaluated operand
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Dec 24 19:19:05 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108218
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-12-24
Known to work| |11.3.0
Ever confirmed|0 |1
Summary|[12 Regression] Constant |[12/13 Regression] Constant
|arguments in the new |arguments in the new
|expression is not checked |expression is not checked
|in unevaluated operand |in unevaluated operand
Known to fail| |12.1.0
Target Milestone|--- |12.3
Keywords| |needs-bisection,
| |rejects-valid
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Here is a rejects valid code:
template<class T>
concept C = requires
{
new int[(int)sizeof(T) - 4];
};
template<typename T>
class CC {
CC() requires C<T> {
new int[(int)sizeof(T) - 4];
}
CC() {
}
};
template class CC<char>;
More information about the Gcc-bugs
mailing list