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: proposal: stricter type-checking for macros Date: Thu, 25 Mar 2004 10:27:46 -0500 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: <16482.53029.540065.796985@localhost.localdomain> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1080229773 5612 80.91.224.253 (25 Mar 2004 15:49:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 25 Mar 2004 15:49:33 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Mar 25 16:49:18 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 1B6X6c-0003XQ-00 for ; Thu, 25 Mar 2004 16:49:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B6Wo1-0007x0-EF for guile-devel@m.gmane.org; Thu, 25 Mar 2004 10:30:05 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B6WnJ-0007oD-9I for guile-devel@gnu.org; Thu, 25 Mar 2004 10:29:21 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B6Wmc-0007gO-R5 for guile-devel@gnu.org; Thu, 25 Mar 2004 10:29:10 -0500 Original-Received: from [129.22.104.47] (helo=mirapoint2.tis.cwru.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1B6Wmc-0007bM-4P for guile-devel@gnu.org; Thu, 25 Mar 2004 10:28:38 -0500 Original-Received: from multivac.cwru.edu (multivac.ITS.CWRU.Edu [129.22.114.26]) by mirapoint2.tis.cwru.edu (MOS 3.4.3-CR) with SMTP id ARH13875; Thu, 25 Mar 2004 10:27:47 -0500 (EST) Original-Received: (qmail 13323 invoked by uid 500); 25 Mar 2004 15:28:08 -0000 Original-To: hanwen@xs4all.nl In-Reply-To: <16482.53029.540065.796985@localhost.localdomain> (Han-Wen Nienhuys's message of "Thu, 25 Mar 2004 13:23:01 +0100") Mail-Copies-To: nobody Mail-Followup-To: hanwen@xs4all.nl, guile-devel@gnu.org Original-Lines: 13 User-Agent: Gnus/5.110002 (No Gnus v0.2) 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:3571 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3571 Han-Wen Nienhuys wrote: > // #define TYPECHECK(x) (global_object = (x)) #define TYPECHECK(x) (0? (void)(*(SCM*)0=(x)): (void)0) Casting to void ensures that the resulting "value" won't accidentally be used for anything. "0?" ensures that the null pointer won't actually be dereferenced. I'd expect dead-code elimination to compile this into nothing, but I haven't checked which optimization level this happens for. paul _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel