Article View: gnu.gcc.help
Article #41378HELP: varargs w gcc-2.7.2 on solaris 2.5
From: Randy Hall
Date: Wed, 03 Apr 1996 00:00
Date: Wed, 03 Apr 1996 00:00
41 lines
1335 bytes
1335 bytes
I am having difficulty getting simple programs which
use varargs to compile using gcc-2.7.2 on solaris 2.5
A sample program might be:
#include <stdio.h>
#include <stdarg.h>
int foo(int, ...);
main()
{
int a, b, c;
foo(a, b, c);
}
int foo(int a, ...)
{
va_list ap;
va_start(ap, a); /* problem line */
}
Compiling the program results in the error "__builtin_va_alist
is undefined". I have tried various tricks such as manually
defining the symbol myself or #undefing the __STDC__ macro to
get the old style varargs, and while these tricks allow
successful compilation, the symbol shows up unresolved in the
link phase.
I have also played around with various combinations of #defining
the __BUILTIN_VA_ARG_INTR macro with no luck.
I don't know if this is a gcc problem, solaris 2.5 problem, or my
stupidity. Any help would be most appreciated.
Randy
<erh@ix.netcom.com>
Technical Details
Message-ID:
<4juau2$43p@cloner3.netcom.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,368b4b14f08df7cd,start X-Google-Attributes: gid11318c,public From: erh@ix.netcom.com(Randy Hall) Subject: HELP: varargs w gcc-2.7.2 on solaris 2.5 Date: 1996/04/03 Message-ID: <4juau2$43p@cloner3.netcom.com> X-Deja-AN: 145630607 organization: Netcom x-netcom-date: Wed Apr 03 9:01:54 AM PST 1996 newsgroups: gnu.gcc.help