Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site hadron.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!gatech!ut-sally!seismo!rlgvax!hadron!jsdy From: jsdy@hadron.UUCP (Joseph S. D. Yao) Newsgroups: net.lang.c Subject: Re: Context Variables Message-ID: <116@hadron.UUCP> Date: Tue, 3-Dec-85 00:56:01 EST Article-I.D.: hadron.116 Posted: Tue Dec 3 00:56:01 1985 Date-Received: Thu, 5-Dec-85 08:12:03 EST References: <230@brl-tgr.ARPA> Reply-To: jsdy@hadron.UUCP (Joseph S. D. Yao) Organization: Hadron, Inc., Fairfax, VA Lines: 16 Summary: Not quite. On most "reasonable" machine architectures, any scalar or pointer data type should fit into a long. However, in C, a pointer isn't defined to fit into a long (or be in any way commensurable with a scalar data type), so you may have problems on some of the more different architectures. Supposedly, sizeof(long) >= sizeof(int) >= sizeof(short), although I have seen someone argue on this net that it was legitimate to have an int whose size > sizeof(long). I never saw anyone bother to refute that; but I think it's not likely. When they are implemented, a (void*) will hold any pointer data type, so a union {long; void *;} should hold any object. But, to help preserve your own sanity and follow the Prime Rule ("say what you mean"), you really should make a union of all the different data types with which you'll be working. -- Joe Yao hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}