[gccsdk] Expanding Macros
lists at snowstone.org.uk
Sun May 20 02:04:12 PDT 2007
In message <555e460a4e.admin at snowstone.org.uk>, Adam wrote:
In message <4effdc1204sbellon at sbellon.de>, Stefan Bellon wrote:
> Adam 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".
> > :-(
> When you normally do a
> gcc -c hellow.c
> in order do compile your hello world program, now do the following
> instead to see the code after the preprocessor has run over it:
> gcc -E hellow.c
> In this output you can see how macros have been expanded.
> Doh. Thanks John, Stefan. I've no idea what I did wrong last time but
> it's worked a treat now :-)
Sorry, to drag up this old thread, but I've subsequently discovered what
the problem was here.
GCC doesn't seem to like compiling files which don't have a .c suffix
- it generates the "linker input unused" error. Is this unexpected
behaviour and if so could the error be more informative?
Adam Richardson Carpe Diem
More information about the gcc