This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Java: more method DECL_NAME wfl fixes, problem with cast.
- To: apbianco at cygnus dot com
- Subject: Re: [PATCH] Java: more method DECL_NAME wfl fixes, problem with cast.
- From: Graham Stott <grahams at redhat dot com>
- Date: Thu, 01 Feb 2001 11:06:09 +0000
- Cc: gcc-patches at gcc dot gnu dot org
- References: <200102011031.CAA29010@deliverance.cygnus.com>
Alexandre Petit-Bianco wrote:
>
> I found some more problems related to the elimination of WFLs in
> method DECL_NAMEs. There's also this cast problem that I found while
> building kawa from source the other day. I'm checking this in.
>
> ./A
>
> 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
>
> * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root last
> argument.
> * parse.y (finish_method_declaration): Code accounting for WFLed
> method DECL_NAMEs deleted.
> (check_abstract_method_definitions): Likewise.
> (resolve_type_during_patch): Layout resolved type.
> * typeck.c (lookup_do): Removed unused local.
>
> Index: jcf-parse.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/java/jcf-parse.c,v
> retrieving revision 1.73
> diff -u -p -r1.73 jcf-parse.c
> --- jcf-parse.c 2001/01/24 08:08:36 1.73
> +++ jcf-parse.c 2001/02/01 08:19:03
> @@ -1135,5 +1135,5 @@ init_jcf_parse ()
> /* Register roots with the garbage collector. */
> ggc_add_tree_root (parse_roots, sizeof (parse_roots) / sizeof(tree));
>
> - ggc_add_root (¤t_jcf, 1, sizeof (JCF), ggc_mark_jcf);
> + ggc_add_root (¤t_jcf, 1, sizeof (JCF), (void (*)(void *))ggc_mark_jcf);
> }
Wouldn't it be better to change the prototype for ggc_mark_jcf to be "void *" rather
than "void **". Then we can loose this ugly cast.
Graham