This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: Don Hayward <address@hidden> >Organization: Mote Marine Laboratory >Keywords: 199508301834.AA27836 netCDF Solaris 2.4 gcc Don, > Here is the gcc output (which shouldn't exist). I guess there's a > problem with the gcc installation. Thanks again for your help. > > don > > x.c: In function `foo': > x.c:7: `__builtin_va_alist' undeclared (first use this function) > x.c:7: (Each undeclared identifier is reported only once > x.c:7: for each function it appears in.) `__builtin_va_alist' is a special built-in function that is part of the Sun SPARCompiler compilation system. This error message indicates that gcc is using the Sun /usr/include/stdarg.h rather than the gcc-specific stdarg.h header file, which should have been installed in some place gcc looks for it. For example, on my Sun, it's in /usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.3/2.6.3/include/stdarg.h, and it starts out: /* stdarg.h for GNU. Note that the type used in va_arg is supposed to match the actual type **after default promotions**. Thus, va_arg (..., short) is not valid. */ Where it gets installed is determined when gcc is built and installed, but in any case, gcc is supposed to know where to look for such compiler-specific include files. Perhaps whoever installed gcc on your system merely copied the gcc executable, without also copying the necessary auxiliary header files to where gcc expects them. --Russ ______________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu