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

2015-05-27 Thread Eric Botcazou
> You can leave get_inner_reference in its place then ... or move it. It's > hardly only used by expansion now. Yes, but it's a hot function and I'd rather preserve its SVN history so I'm leaving it in its original place. Thanks for the review. Here's the patch I have installed after having te

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

2015-05-27 Thread Richard Biener
On Wed, May 27, 2015 at 12:50 PM, Eric Botcazou wrote: >> 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. > > The former is s

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

2015-05-27 Thread Eric Botcazou
> 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. The former is simply not possible since expr.h is poisoned for FEs... I can

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

2015-05-27 Thread Richard Biener
On Wed, May 27, 2015 at 12:00 PM, Eric Botcazou 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 function

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

2015-05-27 Thread Eric Botcazou
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_re