This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Spam: Can macros be expanded only during the start of a program?
- From: <snodx at hotmail dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 30 Aug 2004 14:07:34 +0530
- Subject: Spam: Can macros be expanded only during the start of a program?
Hi everybody,
I am trying out a rather complex build of an open source package containing
some hundreds of '.c' and '.h' modules. I am getting stuck up at one point.
The portion of the code that is failing goes something like this (in
pseudocode language)
.......Statement..........
.......Statement..........
MACRO EXPANSION
.......Statement..........
.......Statement..........
The macro is mapped to a function and the expansion occurs in between some
set of statements. The make is failing at this line with the error:
MACRO EXPANSION
Invalid statement
I am looking into the problem. However I just wanted to know one thing (a
newbie question you could say), just as in between a set of statements you
cant declare a new variable by saying "int x" or something is it also the
case that macros can only be expanded only at the declaration-of-variables
stage?
Thanks in advance.
SNODX