Subject: strange prototypes in header
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Michael L. VanLoon -- Iowa State University <michaelv@iastate.edu>
List: current-users
Date: 12/08/1993 01:13:25
There are several places in the sources where g++ seems very confused
by these lines in /usr/include/stdio.h:

int      snprintf __P((char *, size_t, const char *, ...))
                __attribute__((format (printf, 3, 4)));
int      vsnprintf __P((char *, size_t, const char *, _VA_LIST_))
                __attribute__((format (printf, 3, 0)));
int      vscanf __P((const char *, _VA_LIST_))
                __attribute__((format (scanf, 1, 0)));
int      vsscanf __P((const char *, const char *, _VA_LIST_))
                __attribute__((format (scanf, 2, 0)));

Building groff is one place where this shows up:

g++ -O -I/local/src/gnu/usr.bin/groff/libgroff/../include
-DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1
-DHAVE_STDLIB_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1
-DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1
-DUNISTD_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1
-DRETSIGTYPE=void -DHAVE_MMAP=1 -DHAVE_RENAME=1 -DHAVE_MKSTEMP=1
-DHAVE_SYS_SIGLIST=1 -c /local/src/gnu/usr.bin/groff/libgroff/assert.cc
In file included from /usr/include/g++/stdio.h:71, from /local/src/gnu/usr.bin/groff/libgroff/assert.cc:20:
/usr/include/stdio.h:274: unrecognized format specifier for `int
snprintf (char *, unsigned int, const char *, ...)'
/usr/include/stdio.h:276: unrecognized format specifier for `int
vsnprintf (char *, unsigned int, const char *, char *)'
/usr/include/stdio.h:278: unrecognized format specifier for `int
vscanf (const char *, char *)'
/usr/include/stdio.h:280: unrecognized format specifier for `int
vsscanf (const char *, const char *, char *)'
*** Error code 1

All my compiler stuff is current as of two days ago.

------------------------------------------------------------------------------
    Michael L. VanLoon  --  michaelv@iastate.edu  --  gg.mlv@isumvs.bitnet
 Iowa State University of Science and Technology -- The way cool place to be!
   Project Vincent Systems Staff, Iowa State University Computation Center
------------------------------------------------------------------------------



------------------------------------------------------------------------------