[libc-commits] [PATCH] D152283: [libc] Export GPU extensions to `libc` for external use
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jun 7 11:34:24 PDT 2023
jhuber6 added inline comments.
================
Comment at: libc/include/llvm-libc-types/rpc_opcodes_t.h:12
+
+typedef enum : unsigned short {
+ RPC_NOOP = 0,
----------------
sivachandra wrote:
> 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.
I see, well the size is relevant so we could probably do one of those `OPCODE_LAST = 0xFFFF` things instead.
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