From owner-freebsd-alpha Fri Dec 8 14:55:48 2000 From owner-freebsd-alpha@FreeBSD.ORG Fri Dec 8 14:55:46 2000 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id 9DD8737B400; Fri, 8 Dec 2000 14:55:46 -0800 (PST) Received: from dragon.nuxi.com (Ipittythefoolthattrustsident@trang.nuxi.com [209.152.133.57]) by relay.nuxi.com (8.9.3/8.9.3) with ESMTP id OAA40508; Fri, 8 Dec 2000 14:55:45 -0800 (PST) (envelope-from obrien@NUXI.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.1/8.11.1) id eB8Mtin82828; Fri, 8 Dec 2000 14:55:44 -0800 (PST) (envelope-from obrien) Date: Fri, 8 Dec 2000 14:55:44 -0800 From: "David O'Brien" To: Mike Smith Cc: alpha@freebsd.org Subject: Re: cvs commit: src/sys/alpha/conf GENERIC Message-ID: <20001208145543.A46079@dragon.nuxi.com> Reply-To: alpha@freebsd.org References: <20001208205603.C401D37B404@hub.freebsd.org> <200012082109.eB8L9vF02129@mass.osd.bsdi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200012082109.eB8L9vF02129@mass.osd.bsdi.com>; from msmith@freebsd.org on Fri, Dec 08, 2000 at 01:09:57PM -0800 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: obrien@NUXI.com Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, Dec 08, 2000 at 01:09:57PM -0800, Mike Smith wrote: > > How is this not a syntax error? > > Because there's a comma between the two statements. > > i = 10, j = malloc(i); > > is a legal expression which returns 10. The comma operator really only > exists for things like Almost -- acutally the value of the expression is `malloc(i)'. ISO/IEC 9899:1999(E) 6.5.17 Comma operator Semantics: The left operand of a comma operator is evaluated as a void expression; thre is a sequence point after its evaluation. The the right operand is evaluated; the result has its type and value.[94] [94] A comma operator does not yeild an lvalue. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message