This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Checking for the Programming Language inside GCC
- From: Andrew Haley <aph at redhat dot com>
- To: "Shobaki, Ghassan" <Ghassan dot Shobaki at amd dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 28 Apr 2009 19:09:46 +0100
- Subject: Re: Checking for the Programming Language inside GCC
- References: <912DA18E911D8B418824641EF1541F3C0D5AFC@ssvlexmb2.amd.com>
Shobaki, Ghassan wrote:
> In some optimization passes it may be useful to know the programming
> language that we are compiling. Is there a way to get that information
> in the middle end and back end?
Hmm. I would rather that the amount of language-specific optimization
were kept to an absolute minimum. I maintain the Java front-end, and
the fact that the optimizers I use work the same way for C makes me
very happy. I wouldn't do it if I were you. Better to find a way to
describe what you need to do in a langauge-independent form.
Andrew.