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

Aaron Ballman via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 5 07:21:45 PST 2024


================
@@ -113,6 +113,15 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 // for them:
 
 // enum class errc
+//
+// LWG3869 deprecates the UNIX STREAMS macros and enum values.
+// This makes the code clumbersome:
+// - the enum value is deprecated and should show a diagnostic,
+// - the macro is deprecated and should _not_ show a diagnostic in this
+//   context, and
+// - the macro is not always available.
+// This leads to the odd pushing and popping of the deprecated
----------------
AaronBallman wrote:

Oofda. I want to call this a bug, but it's going to be exceptionally hard to work around because of the difference in phases of translation. We issue the deprecated macro warning when the macro is expanded, which is *long* before we have any idea of how the value is being used. So it may be worth filing a QoI enhancement request over it, but I don't know that we have a way to improve it just yet.

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


More information about the libcxx-commits mailing list