[libc-commits] [PATCH] D71094: [libc] Add implementation of errno and define the other macros of errno.h.

Alex Brachet via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Dec 6 00:59:40 PST 2019


abrachet added inline comments.


================
Comment at: libc/config/linux/api.td:34
+  let Defn = [{
+    int *__errno_location() __attribute__((const));
+    #define errno *__errno_location()
----------------
I don't have a Windows machine to test this, but from godbolt, `__attribute__`'s seem to be unrecognized by MSVC or at least const was not a known one. I see other libcs conditionally defining (on `__GNUC__` according to @MaskRay) an `__attribute_const` or something like that.

FWIW I don't favor adding this attribute. How useful will this even be really?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71094





More information about the libc-commits mailing list