[Bug c++/114573] -Wzero-as-null-pointer-constant complains on enum with explicit cast

2024-04-03 Thread ossman at cendio dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114573

--- Comment #2 from Pierre Ossman  ---
Indeed. It is part of an effort to have a more modern C++ style in TigerVNC.
One item was preferring nullptr over NULL, and this issue became an obstacle
there.

Right now, we did a #pragma, but if there is a better workaround, then we are
all ears.

[Bug c++/114573] -Wzero-as-null-pointer-constant complains on enum with explicit cast

2024-04-03 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114573

Richard Biener  changed:

   What|Removed |Added

   Keywords||diagnostic
   Last reconfirmed||2024-04-03
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #1 from Richard Biener  ---
Confirmed.  Note this diagnostic isn't enabled with -Wall or -Wextra.