[PATCH] D157331: [clang] Implement C23 <stdckdint.h>

Elliott Hughes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 7 16:00:50 PDT 2023


enh added inline comments.


================
Comment at: clang/lib/Headers/stdckdint.h:13
+
+#if defined(__GNUC__)
+#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R))
----------------
ZijunZhao wrote:
> enh wrote:
> > is this ever _not_ set for clang?
> https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/stdbool.h#L23
> I think it is set?
i get an error from
```
/tmp$ cat x.c
#if defined(__GNUC__)
#error foo
#endif
```
regardless of whether i compile with -std=c11 or -std=gnu11.
neither -ansi nor -pedantic seem to stop it either.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157331



More information about the cfe-commits mailing list