This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Target-specific Front-Ends? (Was: front end changes for altivec)
- From: Bernd Schmidt <bernds at redhat dot com>
- To: Ziemowit Laski <zlaski at apple dot com>
- Cc: Stan Shebs <shebs at apple dot com>, Ira Ruben <ira at apple dot com>, <gcc at gcc dot gnu dot org>
- Date: Tue, 27 Nov 2001 22:13:12 +0000 (GMT)
- Subject: Re: Target-specific Front-Ends? (Was: front end changes for altivec)
On Tue, 27 Nov 2001, Ziemowit Laski wrote:
> How could we go about step 3? I'm sure there are a million ways,
> but let me illustrate one possible scenario (for AltiVec):
> 1. We create a file called gcc/config/rs6000/c-parse.in.diff
> (and something analogous for C++)
> 2. At build time, this diff will be used to patch up
> gcc/c-parse.in if needed.
When you suggest that there is no harm in that, you think only of the
present, not of the future.
Well, imagine we try to support not one, but fourty-two poorly designed
extensions this way (and it would happen - everyone would go "hey, you
did it for Altivec, why can't I put in my feature too"). Imagine trying
to make any changes to the C parser if you have to make sure none of these
patches break. It would be impossible - you'd have to build and test as
many toolchains as there are such extensions, rather than building just
one.
Conditional compilation has the same problem. It's a maintenance
nightmare. The only way to prevent it is to say "no" right at the
start.
Bernd