bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI, recent gcc vs. glibc's `#define printf(...' vs texinfo-4.0b


From: Alexandre Oliva
Subject: Re: FYI, recent gcc vs. glibc's `#define printf(...' vs texinfo-4.0b
Date: 02 May 2001 19:48:24 -0300
User-agent: Gnus/5.090002 (Oort Gnus v0.02) XEmacs/21.1 (Cuyahoga Valley)

On May  2, 2001, Jim Meyering <address@hidden> wrote:

>   info.c:8:1: directives may not be used inside a macro argument
>   info.c:8:1: unterminated argument list invoking macro "printf"

> Of course, the original line numbers were different.

> Using /usr/bin/gcc:
>   Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
>   gcc version 2.95.4 20010319 (Debian prerelease)
> it compiled just fine.

The difference is more likely to be in glibc headers, not in GCC.
AFAIK, it could never cope with preprocessor directives within macro
expansions.

> If the definition of printf above (extracted from glibc's stdio.h)
> is valid, then I suppose this is a problem with gcc.

The problem is in the program that assumes any C standard function is
not implemented as a macro.  The C Standard explicitly allows a number
of functions to be implemented as preprocessor macros, and it doesn't
allow preprocessor directives within macro expansions.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



reply via email to

[Prev in Thread] Current Thread [Next in Thread]