https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111281
--- Comment #8 from Frank Heckenbach ---
I don't suggest to get rid of the warning. As I said in #3, if it's hard to
track, a more inclusive wording seems fine to me.
But my main grief about this message is the lack of context, i.e. the really
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111281
--- Comment #7 from Jonathan Wakely ---
The warning comes from the middle end, where the context of the conversion to
bool might have been lost. But the C++ front end already suppresses those
warnings in several places:
/* This is a compiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111281
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111281
--- Comment #5 from Jonathan Wakely ---
(In reply to Frank Heckenbach from comment #4)
> template concept IsFunction = std::is_function_v ||
> (std::is_pointer_v && std::is_function_v >);
remove_pointer is a no-op for non-pointers so you'll
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111281
--- Comment #4 from Frank Heckenbach ---
FWIW, as stated, the lack of context in the message made it hard to find the
actual location of the bug in my code -- in the end even harder than I had
expected since it was well hidden.
Fortunately I
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111281
--- Comment #3 from Frank Heckenbach ---
Thanks for the additional info. I still think it would be useful if the message
told me that, rather than you. ;)
- 'nonnull' is a GCC attribute, and quoting it makes it look like it refers to
that,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111281
--- Comment #2 from Andrew Pinski ---
>- There is no "nonnull" in the code.
It is nonnull since it is a reference. References cannot pointer to null
values.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111281
--- Comment #1 from Andrew Pinski ---
>- There is no comparison (to NULL or anything else for that matter) in the
>code.
Actually there is because there is a conversion to bool happening ...