This is the mail archive of the gcc@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: Finding unnecessary (K&R compat) casts


On Thursday 17 July 2003 15:23, Kaveh R. Ghazi wrote:
>
> read_seek in mips-tdump.c looks like a candidate, but the one in
> mips-tfile.c returns a page_t* (?), so the casts might be necessary
> there.
>

Yes, you want to keep the casts in mips-tfile.c.

>  >
>  > free
>
> I think those are necessary to cast aways const-ness.
>

Yes, some. But these can go:

./gcc/diagnostic.c:      free ((char*) new_prefix);
./gcc/regclass.c:           free ((char *) renumber);
./gcc/regclass.c:           free ((char *) reg_pref);
./gcc/regclass.c:       free ((char *) reg_data);
./gcc/ssa.c:    free ((void *) *slot);
./fixinc/fixincl.c:            free ( (void*)pz );
./fixinc/fixincl.c:  free ((void *) pz_res);
./fixinc/fixincl.c:  free( (void*)pz_cmd );
./fixinc/fixincl.c:      free ((void*)pz_cmd);
./fixinc/fixlib.c:              free ((void *) pz_data);
./fixinc/server.c:      free ((void *) pz_text);

Florian


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