On Sun, 16 Jun 2024, Martin Uecker via Gcc wrote: > I think it should not warn about: > > char *x; > *(char * volatile *)&x; > > as this is regular qualifier adding and this is > a bug in GCC. > > I would guess it looks at all qualifiers added at > all level but should ignore the one on the first level.
This is meant to be implementing, as an extension to C, the C++ rules (where converting from char** to const char** is unsafe, but converting from char** to const char*const* is safe). So the first question is what C++ thinks of this conversion. -- Joseph S. Myers josmy...@redhat.com