This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Enabling a function based on Language
- From: Ian Lance Taylor <iant at google dot com>
- To: "Iyer\ at google dot com, Balaji V" <balaji dot v dot iyer at intel dot com>
- Cc: "'gcc\ at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Mon, 21 May 2012 17:31:10 -0700
- Subject: Re: Enabling a function based on Language
- References: <BF230D13CA30DD48930C31D4099330000F261136@FMSMSX102.amr.corp.intel.com>
"Iyer, Balaji V" <balaji.v.iyer@intel.com> writes:
> Is there a #define in GCC that will turn on only for certain languages? I am trying to use build_array_ref but it is giving me a undefined reference for f951. This code that I am trying to use will ONLY execute if we have a C/C++ code. Is it possible for me to enclose this inside some #defines (or a combination of them)?
By definition, no, there isn't. The middle-end is compiled once, into a
library. Then each frontend is linked against that library.
Calling a frontend function like build_array_ref from the middle-end is
always a mistake. In the middle-end you should probably be making a
POINTER_PLUS_EXPR node or something along those lines.
Ian