Prepare gcc for 64-bit obstacks
Jeff Law
law@redhat.com
Thu Sep 25 19:41:00 GMT 2014
On 08/04/14 05:04, Alan Modra wrote:
> Two small changes to gcc code to support newer obstacks:
>
> 1) gcc currently calls _obstack_begin, which requires some ugly casts
> on alloc and free functions, and the casts will change when/if 64-bit
> obstacks are available. It's cleaner to use the convenience functions
> provided in obstack.h.
>
> 2) Current upstream obstack.h makes obstack_base() return a void*,
> with the result that a few places in gcc need a (char *) cast.
>
> Bootstrapped and regression tested x86_64-linux and powerpc-linux,
> with both the new obstack.{h,c} and the old versions. OK to apply?
>
> gcc/
> * gengtype.h (obstack_chunk_alloc, obstack_chunk_free): Remove cast.
> * coretypes.h (obstack_chunk_alloc, obstack_chunk_free): Likewise.
> (gcc_obstack_init): Use obstack_specify_allocation in place of
> _obstack_begin.
> * genautomata.c (next_sep_el): Cast result of obstack_base to (char *).
> (regexp_representation): Likewise.
> * godump.c (go_output_type): Likewise.
> gcc/java/
> * mangle.c (finish_mangling): Cast result of obstack_base to (char *).
> * typeck.c (build_java_argument_signature): Likewise.
> (build_java_signature): Likewise.
> gcc/objc/
> * objc-encoding.c (encode_array): Cast result of obstack_base.
> (encode_type): Likewise.
> libcpp/
> * symtab.c (ht_create): Use obstack_specify_allocation in place of
> _obstack_begin.
> * files.c (_cpp_init_files): Likewise.
> * init.c (cpp_create_reader): Likewise.
> * identifiers.c (_cpp_init_hashtable): Likewise.
OK for the trunk. Sorry for the delay in getting to this.
Thanks,
Jeff
More information about the Gcc-patches
mailing list