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

--- Comment #2 from George Thopas <george.thopas at gmail dot com> ---
(In reply to Eric Botcazou from comment #1)
> The warning on the union is indeed an oversight, but the other is
> conservatively correct, although we may make a special case for
> __builtin_alloca.

Hi Eric, first of all, thanks for looking into this. 

It may not be immediately obvious from my example but the the builtin_alloca is
not the only problem. 

Any malloc/calloc has the same effect. Even if one requires casts at alloc
time, any free will trigger the same warning.

    t_s12 *msg1 = (t_s12)malloc(10);
    free(msg1);

I don't understand what the incompatibility reported is with void pointers.  To
my understanding they are type-less and can't be dereferenced.

Reply via email to