[patch] Move generic tree functions from expr.h to tree.h

Richard Biener richard.guenther@gmail.com
Wed May 27 11:01:00 GMT 2015


On Wed, May 27, 2015 at 12:00 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> a few functions manipulating generic trees from expr.c are useful for FEs too
> and some of them (array_ref_{low,up}_bound, get_inner_reference) are already
> declared in tree.h instead of expr.h.  This patch moves 3 similar functions
> (array_ref_element_size, array_at_struct_end_p, component_ref_field_offset).
>
> Tested on x86_64-suse-linux, OK for the mainline?

No.  Prototypes of functions defined in A.c should be in A.h, not in some other
header.  We've been (slowly) moving to that.  You should have moved them all
to expr.h instead, or move the implementations to tree.c.

Richard.

>
> 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
>
>         * expr.h (array_at_struct_end_p): Move to...
>         (array_ref_element_size): Likewise.
>         (component_ref_field_offset): Likewise.
>         * tree.h (array_ref_element_size): ...here.
>         (array_at_struct_end_p): Likewise.
>         (component_ref_field_offset): Likewise.
>         * expr.c (array_ref_up_bound): Move around.
>
>
> --
> Eric Botcazou



More information about the Gcc-patches mailing list