bug-glibc
[Top][All Lists]
Advanced

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

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


From: Jim Meyering
Subject: FYI, recent gcc vs. glibc's `#define printf(...' vs texinfo-4.0b
Date: 02 May 2001 19:02:08 +0200
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.0.103

Using the very latest gcc, as checked out a couple of hours ago,
and Debian unstable's libc-2.2.2, I tried to build texinfo-4.0b
(ftp://texinfo.org/texinfo/pretests/texinfo-4.0b.tar.gz)
but was surprised to get this failure:

  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.

Here's the pared-down info.c:

---------------------------------
  #define printf(fmt, args...) fprintf (stdout, fmt, ## args)

  static void
  info_short_help ()
  {
    printf ("%s",
  #ifdef __MSDOS__
  "a"
  #else
  "b"
  #endif
            );
  }
---------------------------------

Compiling the above with /usr/bin/gcc succeeded.

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



reply via email to

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