This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc 3.0, printf() and exim-3.30
- To: Nix <nix at esperi dot demon dot co dot uk>
- Subject: Re: Gcc 3.0, printf() and exim-3.30
- From: Andreas Schwab <schwab at suse dot de>
- Date: 21 Jun 2001 10:25:40 +0200
- Cc: Vadim Vygonets <vadik at vygo dot net>, gcc at gcc dot gnu dot org
- References: <20010619161158.F9339@vygo.net> <87bsnihitd.fsf@loki.wkstn.nix>
Nix <nix@esperi.demon.co.uk> writes:
|> On Tue, 19 Jun 2001, Vadim Vygonets stipulated:
|> > A macro? True?
|>
|> Looks legal to me...
|>
|> >> gcc -c -DNOPOSIX -O pcretest.c
|> >> pcretest.c:474:1: directives may not be used inside a macro argument
|>
|> Correct, but not relevant to this situation, I think.
|>
|> > The code in question reads:
|> >
|> > printf(" -d debug: show compiled code; implies -i\n"
|> > " -i show information about compiled pattern\n"
|> > #if !defined NOPOSIX
|> > " -p use POSIX interface\n"
|> > #endif
|> > " -s output store information\n"
|> > " -t time compilation and execution\n");
|> >
|> > It looks as if gcc 3.0 has printf defined as a macro. IMHO this is
|> > lunacy.
|>
|> Nope; printf is not a macro, and GCC does not define printf :)
But glibc does. This is ok, but preprocessor directives inside macro
arguments are not.
Andreas.
--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5