From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,87b2b4e5af92f3f3,start X-Google-Attributes: gidfee84,public From: "Juan J. Ortega" Subject: Problem with cxx Date: 1997/06/24 Message-ID: <33AFEA91.5430@lcc.uma.es>#1/1 X-Deja-AN: 252298779 Organization: UMA Reply-To: juanjose@lcc.uma.es Newsgroups: comp.unix.osf.osf1 Hi, I am using DEC CXX v.5.4-006 compiler on "Digital UNIX V4.0B (Rev. 564); Tue Feb 25 15:37:19 GMT 1997" and I have some problems with the option to set pointer size to 32 bits (-xtaso_short), and va_list size. This is an example file from "man vfprintf:" // args.cc file ---------------------------------------------------- #include #include #include void error(char *funct, char *fmt, ...) { va_list args; /* ** Display the name of the function that called error */ fprintf(stderr, "ERROR in %s: ", funct); /* ** Display the remainder of the message */ va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); abort(); } // ---------------------------------------------------------------- ...WHEN I USE memch3> cxx -c args.cxx memch3> ...ALL IS OK. ...BUT WHEN I USE memch3> cxx -xtaso_short -c args.cxx cxx: Error: args.cxx, line 17: In this statement, the size of "args" is less than the size of a va_list structure as defined in stdarg.h and varargs.h. va_start(args, fmt); ---------------^ memch3> ... I THINK THAT THE SOURCE OF THIS PROBLEM IS IN __builtin_va_start, BECAUSE I HAVE THE SAME PROBLEM WITH // ppp.cxx file ---------------------------------------------------- #include void ppp( int x, ... ) { va_list l; __builtin_va_start(l,x,1); } // ----------------------------------------------------------------- memch3> cxx -c ppp.cxx memch3> cxx -xtaso_short -c ppp.cxx cxx: Error: ppp.cxx, line 8: In this statement, the size of "l" is less than the size of a va_list structure as defined in stdarg.h and varargs.h. __builtin_va_start(l,x,1); ---^ I USE LEDA-3.4.1. THIS SOFT DO NOT COMPILE WITH 64-BIT POINTERS. AND WITH -xtaso_short: make _string.o cxx -YPOSIX -x cxx -vptr_size_short -xtaso_short -DLEDA_INSTALL -I../../incl -I/usr/include/cxx -O -c _string.c cxx: Error: _string.c, line 125: In this statement, the size of "arg_list" is less than the size of a va_list structure as defined in stdarg.h and varargs.h. STRING_CONSTRUCTOR(char) ^ cxx: Error: _string.c, line 126: In this statement, the size of "arg_list" is less than the size of a va_list structure as defined in stdarg.h and varargs.h. STRING_CONSTRUCTOR(unsigned char) ^ ..... ..... ..... cxx: Error: _string.c, line 136: In this statement, the size of "arg_list" is less than the size of a va_list structure as defined in stdarg.h and varargs.h. STRING_CONSTRUCTOR(void*) ^ make: *** [_string.o] Error 1 Thanks in Advance, Juan J. Ortega