gcc and __builtin_va_alist undeclared, and the FAQ

gcc and __builtin_va_alist undeclared, and the FAQ

Post by Mordechai T. Abz » Wed, 22 Nov 2000 04:00:00



gcc 2.95.2 on a Solaris 7 system is giving me:

sst.c:2452: `__builtin_va_alist' undeclared (first use in this
function)

According to the Solaris 2 FAQ (1.70), this would make sense with
older gccs, but not with gcc 2.8.0 or later.   I went ahead and
recompiled gcc specifically on this system, and it didn't help.
Here's the build command I used:

mkdir objdir; cd objdir && ../configure --enable-languages=c++ &&
         make bootstrap

Here's the install command I used:

cd objdir && make install

The code #includes a file that does a #include <sys/varargs.h>.

- Morty

 
 
 

gcc and __builtin_va_alist undeclared, and the FAQ

Post by Casper H.S. Dik - Network Security Engine » Thu, 23 Nov 2000 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


Quote:>gcc 2.95.2 on a Solaris 7 system is giving me:
>sst.c:2452: `__builtin_va_alist' undeclared (first use in this
>function)
>The code #includes a file that does a #include <sys/varargs.h>.

Is this kernel code?  If so, you neeed Joerg's workaround for
compiling with gcc.  If it's not.  You need to include <varargs.h>
and not <sys/varargs.h>

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

gcc and __builtin_va_alist undeclared, and the FAQ

Post by Mordechai T. Abz » Sat, 25 Nov 2000 12:07:23




Quote:> >The code #includes a file that does a #include <sys/varargs.h>.
> Is this kernel code?  If so, you neeed Joerg's workaround for
> compiling with gcc.  If it's not.  You need to include <varargs.h>
> and not <sys/varargs.h>

Yes, this is kernel code -- a driver for SCSI tape changers, from the
Amanda distribution, that I intend to use with a Sun tape library (AKA
the EXB-210.)

What is Joerg's workaround?  I haven't found anything useful (yet) on
the net.

- Morty