Re: c preprocessor expansion

ninjaboy <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
2009/1/8 Task Struct From Hell <[email protected]>:
> Hi,
>
> I was wondering if gcc has any argument which allows for the expansion
> of all macros in a file, just so if we have something like the
> following:
>
>
> #define FOO "bar"
>
> int main() {
>   printf(FOO);
> }
>
> It will output this:
>
> int main() {
>   printf("bar");
> }
>

gcc -E code.c -o codemacro.m

-- 
noone is alone.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.