From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <0127f0e483812bde9207dcadeb8a009f@terzarima.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] USED() macro From: Charles Forsyth Date: Sat, 12 Nov 2005 11:18:21 +0000 In-Reply-To: <1131789636.7582.55.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-uvaiscfjymhissehbucmvczglk" Topicbox-Message-UUID: ab6f02be-ead0-11e9-9d60-3106f5b1d025 This is a multi-part message in MIME format. --upas-uvaiscfjymhissehbucmvczglk Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit perhaps it could use if(&x) instead of if(x) to cope with structures as well --upas-uvaiscfjymhissehbucmvczglk Content-Type: message/rfc822 Content-Disposition: inline Received: from mail.cse.psu.edu ([130.203.4.6]) by lavoro; Sat Nov 12 10:01:58 GMT 2005 Received: from psuvax1.cse.psu.edu (localhost [127.0.0.1]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2810163FC3 for ; Sat, 12 Nov 2005 05:01:29 -0500 (EST) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: from localhost (localhost [127.0.0.1]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id C41D9630D3 for <9fans@cse.psu.edu>; Sat, 12 Nov 2005 05:01:04 -0500 (EST) Received: from mail.cse.psu.edu ([127.0.0.1]) by localhost (psuvax1 [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24190-01-83 for <9fans@cse.psu.edu>; Sat, 12 Nov 2005 05:00:53 -0500 (EST) Received: from 163.com (m12-13.163.com [220.181.12.13]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 00F91BD1A for <9fans@cse.psu.edu>; Sat, 12 Nov 2005 05:00:50 -0500 (EST) Received: from [10.11.103.195] (unknown [219.140.170.108]) by smtp10 (Coremail) with SMTP id IAC9VE69dUNWn_8A.1 for <9fans@cse.psu.edu>; Sat, 12 Nov 2005 18:00:47 +0800 (CST) X-Originating-IP: [219.140.170.108] From: =?UTF-8?Q?=E6=9D=8E=E5=BE=AE?= To: 9fans <9fans@cse.psu.edu> Content-Type: text/plain Date: Sat, 12 Nov 2005 18:00:36 +0800 Message-Id: <1131789636.7582.55.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at cse.psu.edu X-Spam-Status: No, hits=4.1 tagged_above=3.0 required=5.0 tests=DNS_FROM_AHBL_RHSBL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, RCVD_IN_BL_SPAMCOP_NET, SPF_HELO_PASS, SPF_PASS X-Spam-Level: **** Subject: [9fans] USED() macro X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: 9fans-bounces+forsyth=terzarima.net@cse.psu.edu Errors-To: 9fans-bounces+forsyth=terzarima.net@cse.psu.edu In plan9port, USED() is defined as #define USED(x) if(x){}else{} Does it mean that USED() can only be applied on variables of "scalar types"? But r is of a struct type in void drawresizewindow(Rectangle r) { USED(r); bad(); } in $PLAN9/src/libdraw/nowsys-wsys.c. When compiling, 9c complains on that. A bug? Or an extension of Plan 9's C dialect? --upas-uvaiscfjymhissehbucmvczglk--