public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Spam: Can macros be expanded only during the start of a program?
@ 2004-08-30  8:40 snodx
  2004-08-30 10:52 ` Falk Hueffner
  0 siblings, 1 reply; 2+ messages in thread
From: snodx @ 2004-08-30  8:40 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Spam: Can macros be expanded only during the start of a program?
  2004-08-30  8:40 Spam: Can macros be expanded only during the start of a program? snodx
@ 2004-08-30 10:52 ` Falk Hueffner
  0 siblings, 0 replies; 2+ messages in thread
From: Falk Hueffner @ 2004-08-30 10:52 UTC (permalink / raw)
  To: snodx; +Cc: gcc-help

<snodx@hotmail.com> writes:

> 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?

No.

-- 
	Falk

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-30  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-30  8:40 Spam: Can macros be expanded only during the start of a program? snodx
2004-08-30 10:52 ` Falk Hueffner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).