This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Janitor] Convert ggc-* to ISO C90


Andreas Jaeger <aj@suse.de> writes:

> Zack Weinberg <zack@codesourcery.com> writes:
>
>> Andreas Jaeger <aj@suse.de> writes:
>>
>>> -	  htab_traverse_noresize (*cti->base, ggc_htab_delete, (PTR) cti);
>>> +	  htab_traverse_noresize (*cti->base, ggc_htab_delete, (void *) cti);
>>
>> Casts to (void *) are unnecessary, unless the function takes a
>> variable number of arguments.
>
> Ok, I'll remove these with a separate patch.

It's also worth pointing out that casts *from* void * are unnecessary
to.  This comes up a lot with allocator routines:

  struct foo *foo = (struct foo *) xmalloc (sizeof (struct foo));

the cast can now be removed.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]