This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]