https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189

--- Comment #8 from James Hilliard <james.hilliard1 at gmail dot com> ---
(In reply to Andrew Pinski from comment #7)
> Yes the warning is really still correct even if a closer testcase would be:
> ```
> int f(struct {int t;} *b)
> {
>   return b->t;
> }
> 
> int f1(void *a)
> {
>   return f(a);
> }
> ```
> I am actually shocked clang didn't implement this warning since there is no
> type which is compatible with the typeof *b outside of function f.

Yeah, clang with -std=gnu17 -pedantic doesn't even complain at all from the
looks of it. Does it make sense to allow disabling this specific warning in
GCC?

Reply via email to