https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122105
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2025-09-30
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
For comparison, Clang warns by default, without any options. It doesn't mention
the implementation details, but I find the wording a bit wordy:
$ clang++ lambda.cc
lambda.cc:3:17: warning: address of lambda function pointer conversion operator
will always evaluate to 'true' [-Wpointer-bool-conversion]
3 | static_assert([] { return true; }); // oops, forgot () to invoke the
lambda
| ~~~~~~~~~~~~~ ^
1 warning generated.
I think "lambda function pointer conversion operator" is a mouthful.
MSVC and EDG don't seem to warn.