Article View: gnu.gcc.help
Article #106gcc support of <varargs.h> prototypes
From: Stuart Jarriel
Date: Tue, 04 Aug 1992 15:35
Date: Tue, 04 Aug 1992 15:35
49 lines
1795 bytes
1795 bytes
It is quite likely that i simply dont have my syntax right, but I believe
that gcc is in error on this code.
I cant find a reported bug for this, so it must be me. Has anyone else
seen this?
stuart
-------------------------------------------------------------------------------
/export/usr1/hp9000/make-3.62> gcc -v /tmp/t.c
gcc version 2.2.2
cpp -lang-c -v -undef -D__GNUC__=2 -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D_HPUX_SOURCE -D
__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__ -D__hpux__ -D__unix__ -D___HPUX_SOURCE__ -D__hppa -D_
_hp9000s800 -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -D___HPUX_SOURCE /tmp/t.c /usr/tmp/cca25264.i
GNU CPP version 2.2.2 (hp9000s800)
cc1 /usr/tmp/cca25264.i -quiet -dumpbase t.c -version -o /usr/tmp/cca25264.s
GNU C version 2.2.2 (hp9000s800) compiled by GNU C version 2.2.2.
/tmp/t.c: In function `test':
/tmp/t.c:15: number of arguments doesn't match prototype
/export/usr1/hp9000/make-3.62>
-------------------------------------------------------------------------------
/tmp/t.c
#include <varargs.h>
#include <stdio.h>
extern int test(char *, char *,...);
main()
{
test("me","now");
printf("hello\n");
}
test(a,b,va_alist)
char *a, *b;
va_dcl
{
va_list args;
char *one, *two;
va_start(args);
one = va_arg(args,char *);
two = va_arg(args,char *);
va_end(args);
}
Technical Details
Message-ID:
<2389@tivoli.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!mips!sdd.hp.com!cs.utexas.edu!ut-emx!tivoli!TIVOLI.COM!stuartShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!mips!sdd.hp.com!cs.utexas.edu!ut-emx!tivoli!TIVOLI.COM!stuart From: stuart@TIVOLI.COM (Stuart Jarriel) Newsgroups: gnu.gcc.help Subject: gcc support of <varargs.h> prototypes Message-ID: <2389@tivoli.UUCP> Date: 4 Aug 92 15:35:19 GMT Sender: news@tivoli.UUCP Organization: Tivoli Systems, Inc Lines: 49