On Tue, Jun 23, 2026 at 10:41 PM Oleg Tolmatcev <[email protected]> wrote: > > Am Di., 23. Juni 2026 um 10:53 Uhr schrieb Uros Bizjak <[email protected]>: > > > > On Sun, Jun 21, 2026 at 2:38 PM Oleg Tolmatcev <[email protected]> > > wrote: > > > > > > Match Clang's declaration of _m_prefetchw to avoid requiring > > > const_cast<void *> at call sites. > > > > > > gcc > > > * config/i386/prfchwintrin.h (_m_prefetchw): Take > > > volatile const void * instead of void *. > > > > This now matches Clang and the real Windows header rather than just > > MSVC's docs, but introduces a new warning with -Wcast-qual. Please > > wrap the builtin in > > > > #pragma GCC diagnostic push > > #pragma GCC diagnostic ignored "-Wcast-qual" > > __builtin_prefetch (...) > > #pragma GCC diagnostic pop > > > > and add a testcase that checks that warning is not emitted with -Wcast-qual. > > I will do that, but why is that necessary? It's a system header and by > default GCC > does not produce warnings for system headers even if you compile with > -Wcast-qual.
If this is the case (I tested only with non-system header, where warning is emitted), then the original patch is OK, but please provide a testcase that will check for absence of cast related warnings. > > Also, do you have commit rights to the source repository? > > I don't. Please state that in the patch submission, as advised in [1]. [1] https://gcc.gnu.org/contribute.html#patches Thanks, Uros.
