From owner-cvs-src@FreeBSD.ORG Thu Jan 18 09:08:34 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D12C216A40F; Thu, 18 Jan 2007 09:08:34 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9AE13C45D; Thu, 18 Jan 2007 09:08:34 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id A64422083; Thu, 18 Jan 2007 09:36:53 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 94B7B2081; Thu, 18 Jan 2007 09:36:53 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 1001) id 66EFBB86E; Thu, 18 Jan 2007 09:38:09 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Craig Rodrigues References: <200701180546.l0I5kXpb075646@repoman.freebsd.org> Date: Thu, 18 Jan 2007 09:38:09 +0100 In-Reply-To: <200701180546.l0I5kXpb075646@repoman.freebsd.org> (Craig Rodrigues's message of "Thu, 18 Jan 2007 05:46:32 +0000 (UTC)") Message-ID: <86hcuou3v2.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/amd64/include md_var.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 09:08:34 -0000 Craig Rodrigues writes: > Modified files: > sys/amd64/include md_var.h=20 > Log: > Revert previous change. >=20=20=20 > Requested by: kan You shouldn't have reverted this because kan requested it, you should have reverted it because it was simply wrong and broke the build. An array is not the same as a pointer; it only seems that way because the syntax for dereferencing both is the same. There is a fundamental difference: if foo is an array, then &foo is the address at which the contents of the array are stored. If foo is a pointer, then &foo is the address at which the *address* of the array is stored. As regards the "test case" you quoted at kan, your "fix" only appears to work because you have no correct definition or declaration of array_foo in scope. If your sample code actually did something with the arrays / pointers it declares and you tried to run it, you'd get a segfault. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no