[PATCH] D153911: [cmake] Add -Wcast-qual to C flags if LLVM_ENABLE_WARNINGS is defined.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 09:02:50 PDT 2023


MaskRay added a comment.

In D153911#4515057 <https://reviews.llvm.org/D153911#4515057>, @AlexM wrote:

> In D153911#4514140 <https://reviews.llvm.org/D153911#4514140>, @hctim wrote:
>
>> Hi, we're still seeing sanitizer buildbot failures from what I assume is this patch.
>>
>> https://lab.llvm.org/buildbot/#/builders/37/builds/23724
>>
>>   /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/profile/InstrProfilingValue.c:62:17: error: cast from 'const unsigned short *' to 'unsigned short *' drops const qualifier [-Werror,-Wcast-qual]
>>      62 |   *((uint16_t *)&Data->NumValueSites[ValueKind]) = NumValueSites;
>>
>> Maybe it's worth reverting, doing the cleanup, and then re-submitting rather than trying to fix-forward? It would appear if there's a lot of cleanup required.
>
> I do not have commit access, but I think reverting this makes sense if it is causing build failures. Sorry for the inconvenience!

compiler-rt/lib/profile has been fixed by commit 51c8cacafd47b59e66816b10be357a9877187bc3 <https://reviews.llvm.org/rG51c8cacafd47b59e66816b10be357a9877187bc3>.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153911



More information about the llvm-commits mailing list