This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dynamic macro expansion through a pipe?
- From: Tom Tromey <tromey at redhat dot com>
- To: "Philipp Marek" <philipp at marek dot priv dot at>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 20 Feb 2008 08:11:28 -0700
- Subject: Re: Dynamic macro expansion through a pipe?
- References: <47405.193.171.152.33.1203495604.squirrel@webmail.marek.priv.at>
- Reply-to: tromey at redhat dot com
>>>>> "Philipp" == Philipp Marek <philipp@marek.priv.at> writes:
Philipp> I'm looking for a nice solution.
I think this note is off-topic for the gcc list. gcc-help may be more
appropriate.
Philipp> - I could try #define C(x) uncompress(buffer##__LINE__) and
Philipp> write some script that looks for the C() calls and generates
Philipp> a C file with the buffer constants - which means parsing
Philipp> (some of) C.
Aside from the compression this is what xgettext does, more or less.
You could modify it to suit your needs.
Philipp> - Or, what I'd like best: Is there some way to tell GCC
Philipp> "whenever this macro is used, call program X, and substitute
Philipp> the macro value with the output"? That would be the easiest
Philipp> way for me.
This is very unlikely to happen, sorry.
Tom