https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120187

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is intentional. Including <version> works in any -std mode, at least since
GCC 9.1 when it was first added to libstdc++.

Although <ciso646> was only called out as "meaningless" in C++17 and not
explicitly deprecated, it was entirely removed from C++20 (exactly like the
headers which *were* explicitly deprecated in C++17, such as <ctgmath>).
Emitting a warning for C++17 gives people a chance to stop depending on it
before it disappears. That's what -Wdeprecated is for, after all, and you can
use -Wno-deprecated to suppress the warning.

On the other hand, since <ciso646> does still exist in libstdc++ and isn't
going to actually disappear, maybe it's OK to let people use it in C++17
without a warning, and only give a warning for C++20 and later when it's really
no longer part of the standard.

Reply via email to