[libc-commits] [PATCH] D152283: [libc] Export GPU extensions to `libc` for external use

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jun 7 11:33:07 PDT 2023


sivachandra added inline comments.


================
Comment at: libc/include/llvm-libc-types/rpc_opcodes_t.h:12
+
+typedef enum : unsigned short {
+  RPC_NOOP = 0,
----------------
jhuber6 wrote:
> sivachandra wrote:
> > This would be C++ - is that OK?
> I thought that this was legal C, https://godbolt.org/z/aonTa87Me.
> I thought that this was legal C, https://godbolt.org/z/aonTa87Me.

Using gcc and passing `-std=c99 -pedantic` shows you this warning:

```
warning: ISO C does not support specifying 'enum' underlying types before C2X [-Wpedantic]x86-64 gcc (trunk) #1
```

So, may be OK because it does go through fine with c23. But, we want LLVM's libc to be C11 compliant. Up to you for the GPU side though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152283



More information about the libc-commits mailing list