Ping for patch originally sent in https://sourceware.org/pipermail/libc-alpha/2021-May/126572.html The patch still applies cleanly to current master. On Wed, 19 May 2021 at 16:50, Jonathan Wakely wrote: > > On 19/05/21 15:37 +0000, Joseph Myers wrote: > >On Wed, 19 May 2021, Jonathan Wakely via Libc-alpha wrote: > > > >> +#pragma GCC diagnostic push > >> +#pragma GCC diagnostic ignored "-Wcast-qual" > >> return (void *) __p; > >> +#pragma GCC diagnostic pop > > > >I think such pragma uses in installed headers should be conditional on > >__GNUC_PREREQ (4, 6) (either directly or via conditionally defining a > >macro in sys/cdefs.h). > > Good point. > > I spent about two minutes trying to do something with _Pragma in > sys/cdefs.h to allow: > > __GLIBC_IGNORE_WARNING("-Wcast-qual") > return (void *) __p; > __GLIBC_UNIGNORE_WARNING > > but didn't get it working, so here's a patch that just tests > __GNUC_PREREQ directly. > >