First time ever hear about C compiler that complain about implicit cast
from void* to another pointer.  Which compiler is it?

Sent from mobile


On Wed, 13 Aug 2025 at 14:58, Dave Hart <[email protected]> wrote:

> On Thu, Aug 7, 2025 at 8:52 PM Paul Eggert <[email protected]> wrote:
>
>> That thing with malloc goes too far. 'char *p = malloc (...);' is a good
>> idiom in C, and it's silly and even counterproductive to require a cast.
>
>
> I completely agree.  Adding the cast requires duplicating the type, slows
> comprehension, and invites copy/paste mischief.
>
>
>> I worked around the glitch by not using malloc.
>
>
> I've seen this sort of change elsewhere.  I'm guessing at least one
> compiler is emitting a warning without the superfluous cast.  Can someone
> enlighten me why some folks apparently believe an implicit cast from void
> pointer to another pointer is evil?
>
> Cheers,
> Dave Hart
>
>

Reply via email to