This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Gcc 3.0, printf() and exim-3.30


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]