On Thu, May 27, 2010 at 10:14 AM, Paolo Bonzini <bonz...@gnu.org> wrote: > On 05/27/2010 10:10 AM, Steven Bosscher wrote: >> >> -/* FIXME: Still need to include rtl.h here (via expr.h) in a front-end >> file. >> - Pretend this is a back-end file. */ >> -#define IN_GCC_BACKEND >> #include "expr.h" /* For vector_mode_valid_p */ > > Is this really the only reason? We don't have any other uses of > vector_mode_valid_p, might as well move it into c-common.c.
That's one option. But there are other things the front ends are asking about the modes supported on the target, or about the availability of some instructions (see the java bits), or the target exception model (see USING_SJLJ_EXCEPTIONS). And vector_mode_valid_p is not C-family specific (even if only c-common uses it at the moment) and doesn't belong in expr.c either. I think there should be a new file fe-target.c or something that will hold all front end target support routines. It's my plan to work on that next, to eliminate a few more middle-end headers from the front ends. Ciao! Steven