This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

GCC 2.95.3 missing __builtin_va_alist ?


Hello,

I've recently built gcc 2.95.3 on Solaris 7, with the
latest release of binutils.  It seems to work just fine
up until I get to some code that uses varargs and then
I get this error:
/icarus/OCC/OCC/src/OpenGl/OpenGl_attri.c:559: `__builtin_va_alist'
undeclared (first use in this function)

So I grepped my source for this string, but didn't find
it anywhere.  This code compiles under numerous other
OS's and compilers (gcc 2.95.2 AIX, Linux egcs, etc.),
but dies with gcc 2.95.3, I also tried it under
IRIX 6.5 n32.  Under IRIX I get this error
for the same code:

/icarus/OCC/OCC/src/OpenGl/OpenGl_attri.c:559: parse error before
`cmn_key'
<repeat x5>

It appears to be this preprocessor definition that is
killing it.  Is this legal?

#define CMN_GET_STACK(n,k)  { \
int i; \
va_list ap; \
cmn_key * args; \
va_start (ap,n); \
  if (n>=0) { \
    for (i=0; i<n && i<TMaxArgs; i++) \
      k[i] = va_arg (ap, cmn_key); \
  } \
  else { \
    n = -n; \
    args = va_arg (ap, cmn_key *); \
    for (i=0; i<n && i<TMaxArgs; i++) \
      k[i] = args[i]; \
  } \
  va_end (ap); \
}

I'd be glad to send a bug report, but I'm just not sure
this is a bug (yet).

Thanks,

Robert

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  rboehne@ricardo-us.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]