[libcxx-commits] [PATCH] D150015: [libc++] Consistently enable __CORRECT_ISO_CPP_WCHAR_H_PROTO in mbstate.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun May 7 03:38:25 PDT 2023


Mordante added inline comments.


================
Comment at: libcxx/include/__mbstate_t.h:33
+#ifdef __cplusplus
+#  define __CORRECT_ISO_CPP_WCHAR_H_PROTO
+#endif
----------------
MaskRay wrote:
> Mordante wrote:
> > This looks wrong. When users include both `wchar.h` and `uchar.h` the system may try to define `__CORRECT_ISO_CPP_WCHAR_H_PROTO` twice.
> This is fine. For
> ```
> #  define __CORRECT_ISO_CPP_WCHAR_H_PROTO
> #  define __CORRECT_ISO_CPP_WCHAR_H_PROTO
> ```
> 
> The two replacement lists (empty) are identical and are allowed. Actually, this is what will happen with a glibc newer than 2019-12 (https://sourceware.org/bugzilla/show_bug.cgi?id=25232). glibc `wchar.h` defines the macro `__CORRECT_ISO_CPP_WCHAR_H_PROTO` as well.
Ah yes good point.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150015/new/

https://reviews.llvm.org/D150015



More information about the libcxx-commits mailing list