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

Alex MacLean via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 08:45:40 PDT 2023


AlexM added a comment.

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!


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