-Wcast-qual consistency with initialization conversion and double pointer types

2024-06-15 Thread Ryan Libby via Gcc
I'm not a C language expert and I'm looking for advice on whether a -Wcast-qual diagnostic in one situation and not another is intentional behavior. Here's a set of examples (same as attachment). % cat cast-qual-example.c #define F(name, type, qual) \ typedef type t_##name;

Re: -Wcast-qual consistency with initialization conversion and double pointer types

2024-06-16 Thread Ryan Libby via Gcc
On Sun, Jun 16, 2024 at 12:33 AM Martin Uecker 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 can file a bug if it is indeed one. > I would guess it looks at all qualifiers added at > a