From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.lisp.guile.devel Subject: Re: The relationship between SCM and scm_t_bits. Date: Mon, 17 May 2004 16:17:10 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <40A6307C.9050809@dirk-herrmanns-seiten.de> <871xliq2p0.fsf@zagadka.ping.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084826722 17702 80.91.224.253 (17 May 2004 20:45:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 May 2004 20:45:22 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 17 22:45:04 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BPoyt-0004pZ-00 for ; Mon, 17 May 2004 22:45:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BPoy0-0004TG-PM for guile-devel@m.gmane.org; Mon, 17 May 2004 16:44:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BPoxt-0004SS-OW for guile-devel@gnu.org; Mon, 17 May 2004 16:44:01 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BPoxM-0004M6-6q for guile-devel@gnu.org; Mon, 17 May 2004 16:43:59 -0400 Original-Received: from [129.22.104.46] (helo=mirapoint1.tis.cwru.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BPoYG-00086O-Vk for guile-devel@gnu.org; Mon, 17 May 2004 16:17:33 -0400 Original-Received: from multivac.cwru.edu (multivac.ITS.CWRU.Edu [129.22.114.26]) by mirapoint1.tis.cwru.edu (MOS 3.4.3-CR) with SMTP id BMU67849; Mon, 17 May 2004 16:17:16 -0400 (EDT) Original-Received: (qmail 21610 invoked by uid 500); 17 May 2004 20:17:35 -0000 Original-To: Marius Vollmer In-Reply-To: <871xliq2p0.fsf@zagadka.ping.de> (Marius Vollmer's message of "Mon, 17 May 2004 21:22:03 +0200") Mail-Copies-To: nobody Mail-Followup-To: Marius Vollmer , Dirk Herrmann , guile-devel@gnu.org Original-Lines: 20 User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3728 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3728 Marius Vollmer wrote: > I don't think you can store into one member and then (portably) > assume anything about the value read from a different member. This > is very much like storing into one memory location thru one pointer > and reading that same location through a differently-typed pointer. True in general, although some cases are legal. Any type can be accessed as an array of unsigned char; two structure types with a common initial sequence of members can have those members accessed; the first element of a structure, or any element of a union, can be accessed directly through the element type instead of explicitly as a member of the structure or union. So, for example, if SCM is simply a struct containing scm_t_bits, then you can access that scm_t_bits value without the SCM wrapping, and given a union of scm_t_bits and SCM, you can access the scm_t_bits member, even if the SCM member was the last one assigned to. paul _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel