[llvm] [AArch64][MachO] Add ptrauth ABI version to arm64e cpusubtype. (PR #104650)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 13:18:38 PDT 2024
mstorsjo wrote:
> > When compiled with GCC, this triggers hundreds of warnings like this:
> > ```
> > In file included from /home/martin/code/llvm-project/llvm/include/llvm/Object/MachO.h:23,
> > from /home/martin/code/llvm-project/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:43:
> > /home/martin/code/llvm-project/llvm/include/llvm/BinaryFormat/MachO.h: In function ‘unsigned int llvm::MachO::CPU_SUBTYPE_ARM64E_WITH_PTRAUTH_VERSION(unsigned int, bool)’:
> > /home/martin/code/llvm-project/llvm/include/llvm/BinaryFormat/MachO.h:1664:35: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
> > 1664 | (PtrAuthKernelABIVersion ? CPU_SUBTYPE_ARM64E_KERNEL_PTRAUTH_ABI_MASK
> > | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 1665 | : 0) |
> > | ~~~
> > ```
>
> Hmm, playing around with various gcc versions in godbolt this warning seems to have gotten less noisy in newer versions; looking at the enum I think we can silence it with a little cleanup anyway, I tried [1d7bb2b](https://github.com/llvm/llvm-project/commit/1d7bb2bbfa1d50663e2883e0e8e1d2b147103013). Let me know if that doesn't help!
Thanks! Unfortunately, that doesn't seem to help, at least with GCC 11...
https://github.com/llvm/llvm-project/pull/104650
More information about the llvm-commits
mailing list