[libcxx-commits] [libcxx] [libc++] Deprecates std::errc constants. (PR #80542)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 9 08:50:09 PDT 2024


ldionne wrote:

Personally, I'd tend towards (1), i.e. do not deprecate the macros at all. After re-consideration, I feel like we might be overstepping the boundary between libc++ and the C Standard Library. We don't define these `errno.h` macros, the C Standard Library does. If they decide to mark these macros as deprecated as per POSIX, it's their choice. If they don't, it's their choice too and I feel like trying to force that upon them is only going to create compatibility problems between libc++ and the underlying C library.

@nico Were you asking for an opt-out for the `std::errc` constants being deprecated, or for the `<errno.h>` macros being deprecated? If the latter, we don't need to add one if we do (1). If you wanted an opt-out for the former, I think we can do that as a one-off thing but in general, deprecation warnings are introduced in newer standards only so that acts as the "opt in", as  Mark made me realize just now. So in general, I'd rather not start adding opt-outs for every single deprecation warning we add in newer standard modes. This `std::errc` deprecation is special though, since it is applied as a DR and so I think it would make sense to do a one-off opt-out.

https://github.com/llvm/llvm-project/pull/80542


More information about the libcxx-commits mailing list