[PATCH] D143430: [C2x] Implement the `unreachable` macro for WG14 N2826

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 14 07:28:51 PST 2023


erichkeane added inline comments.


================
Comment at: clang/lib/Headers/stddef.h:108
+    __STDC_VERSION__ >= 202000L
+#define unreachable() __builtin_unreachable()
+#endif /* defined(__need_STDDEF_H_misc) && >= C23 */
----------------
Is this REALLY required to be a macro by standard?  Is it so they don't have to steal the word/can do #undef?  This is going to result in a worse diagnostic here any time we diagnose on this line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143430



More information about the cfe-commits mailing list