Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* 32-bit pointers vs. stdargs
@ 1998-04-29  4:00 Jim Reus
  1998-05-05  4:00 ` Jeff Sullivan
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Reus @ 1998-04-29  4:00 UTC (permalink / raw)



I'm having problems compiling an application requiring 32-bit pointers
(-xtaso_short) and using stdarg.h (ansi-style varargs) on ALPHAstations
running both DU 3.2 and 4.0B (they both seem to give similar
complaints).

The problem is that the (ansi, -std1) C compiler complains about: 

	#include <stdarg.h>

	void f ( char *opt, ... )
	{  va_list args;

		:
	   va_start(args,opt);	/* <=== this is line XXX */
		:
	}

When compiled using "cc -std1 -xtaso_short -c banana.c" I get the
following message:

cc: Error: banana.c, line XXX: 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.

Is there more I should know? The source compiles (and runs) fine in
64-bit mode (without the option -xtaso_short). The application is sadly
pointer-rich Ram-poor so I REALLY want to use 32-bit pointers if at all
possible.

-- jim

-----------------------------------------------------------------------
  Jim Reus                                 | Internet: reus@llnl.gov
  Lawrence Livermore Nat'l Laboratory      | Phone:    (510) 424-3172
  P.O. Box 808 - Mail Stop L-170           | FAX:      (510) 422-3389
  Livermore, CA 94550                      | Location: B132, Room 1038
-----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 32-bit pointers vs. stdargs
  1998-04-29  4:00 32-bit pointers vs. stdargs Jim Reus
@ 1998-05-05  4:00 ` Jeff Sullivan
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Sullivan @ 1998-05-05  4:00 UTC (permalink / raw)



The protect_headers feature (and protect_headers_setup script) are
what you really need. Those are available in DIGITAL UNIX V4.0D.

You may also be able to utilize this feature in V4.0B using the
'cc.alt' compiler (CMPDEVALT410 subset).

These features get around the problem that you are describing and
that is described in Appendix A of the Programmer's Guide. If you
don't have access to the Programmer's Guide locally, take a look at
http://www.UNIX.digital.com/faqs/publications/base_doc/DOCUMENTATION/V40D_HTML/APS30DTE/DOCU_006.HTM

-Jeff
--
Jeff Sullivan | Digital Equipment Corp | E-mail:    jps@zk3.dec.com
DEC C and C++ | Nashua, NH  ZK3-2/2X29 | sullivan@decc.enet.dec.com



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-05-05  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-04-29  4:00 32-bit pointers vs. stdargs Jim Reus
1998-05-05  4:00 ` Jeff Sullivan

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