Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Problem with cxx
@ 1997-06-24  4:00 Juan J. Ortega
  0 siblings, 0 replies; only message in thread
From: Juan J. Ortega @ 1997-06-24  4:00 UTC (permalink / raw)



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 <stdlib.h>

#include <stdarg.h>
	#include <stdio.h>

	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
<stdarg.h>

	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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-06-24  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-06-24  4:00 Problem with cxx Juan J. Ortega

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox