From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Strangeness in ASRT Date: Sun, 10 Feb 2008 14:38:17 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202672719 3552 80.91.229.12 (10 Feb 2008 19:45:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Feb 2008 19:45:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 10 20:45:42 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JOI7K-0003e2-IX for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 20:45:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOI6r-0005Lv-CY for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 14:45:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOI6b-00059U-7r for emacs-devel@gnu.org; Sun, 10 Feb 2008 14:44:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOI6Z-00057g-DT for emacs-devel@gnu.org; Sun, 10 Feb 2008 14:44:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOI6Z-00057R-3V for emacs-devel@gnu.org; Sun, 10 Feb 2008 14:44:47 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JOI6V-0007u0-AZ; Sun, 10 Feb 2008 14:44:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAJPirkdMCpzv/2dsb2JhbACRS5RVew X-IronPort-AV: E=Sophos;i="4.25,330,1199682000"; d="scan'208";a="14003712" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 10 Feb 2008 14:44:42 -0500 Original-Received: from ceviche.home ([76.10.156.239]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id QVC24242; Sun, 10 Feb 2008 14:44:42 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 52CACB406E; Sun, 10 Feb 2008 14:38:17 -0500 (EST) In-Reply-To: (Richard Stallman's message of "Sun, 10 Feb 2008 13:42:16 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88656 Archived-At: > This seems to have a bug which breaks compilation. > /* The IDX==IDX tries to detect when the macro argument is side-effecting. */ > #define ASET(ARRAY, IDX, VAL) \ > (eassert ((IDX) == (IDX)), \ > eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \ > ASLOT ((ARRAY), (IDX)) = (VAL)) > Changing ASLOT to AREF makes it compile. (Bootstrapping still crashes > as before.) Oh, yes, it should be AREF, not ASLOT. Sorry for the mixup. > What is the purpose of these tests? The expansion of AREF > substitutes IDX only once, so there is no problem if it has > a side effect. If ENABLE_CHECKING is true, then eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)) will cause IDX to be eval'd several times, so you'll get errors when you set ENABLE_CHECKING and an argument has the form "index++". Stefan