This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PPC -mlongcall, take two
On Fri, May 10, 2002 at 03:21:25PM -0700, Stan Shebs wrote:
> David Edelsohn wrote:
> >
> > Why do you need to create the new rs6000-c.c file instead of using
> > rs6000.c?
>
> It's how we do code that is both C- and target-specific.
> ls config/*/*-c.c to see similar examples.
To expand on this a little: Pragma handlers need to call c_lex(), and
the code to set them up needs to call cpp_register_pragma(). If this
is done in rs6000.c, the Ada, Fortran, and Java front ends will all
fail to link.
We decided we didn't want to make more routines that the non-C front
ends had to provide stub versions of.
zw