Expanding Macros

John Tytgat John.Tytgat at aaug.net
Sun Mar 19 12:59:40 PST 2006


In message <0851390a4e.admin at snowstone.org.uk>
          Adam <lists at snowstone.org.uk> wrote:

> In message <4effdc11f5sbellon at sbellon.de>, Stefan Bellon wrote:
> 
> > Adam wrote:
> > 
> > > Is there a way to show how macros expand when they go through the C
> > > preprocessor?
> > 
> > Use gcc -E.
> 
> Hmm, I just get "linker input file unused because linking not done". :-(

--8<--
*type c.test
#define foo bar
int foo(void);
*gcc -E -c test.c
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test.c"

int bar(void);
--8<--

John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven




More information about the gcc mailing list