From owner-svn-src-head@FreeBSD.ORG Sat Jan 15 02:43:02 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1E221065670; Sat, 15 Jan 2011 02:43:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 73C9F8FC0A; Sat, 15 Jan 2011 02:43:02 +0000 (UTC) Received: from c122-106-165-206.carlnfd1.nsw.optusnet.com.au (c122-106-165-206.carlnfd1.nsw.optusnet.com.au [122.106.165.206]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p0F2gwY0026641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 15 Jan 2011 13:43:00 +1100 Date: Sat, 15 Jan 2011 13:42:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: mdf@FreeBSD.org In-Reply-To: Message-ID: <20110115133929.D16210@besplex.bde.org> References: <201101131820.p0DIKXip059402@svn.freebsd.org> <20110114174719.D28159@besplex.bde.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1443270800-1295059378=:16210" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r217369 - in head/sys: cam/scsi sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jan 2011 02:43:03 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1443270800-1295059378=:16210 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 14 Jan 2011 mdf@FreeBSD.org wrote: > On Thu, Jan 13, 2011 at 10:50 PM, Bruce Evans wrot= e: >> On Thu, 13 Jan 2011 mdf@freebsd.org wrote: >> >>> There appear to be 330 uses of SYSCTL and QUAD on the same line in >>> CURRENT. =A0This seems reasonable to change them to S64, U64 and X64 so >>> they correctly reflect the size they operate upon. >>> >>> What do y'all think? >> >> Now I suggest delaying this until they can be renamed to a type- generic >> SYSCTL_INT() (would probably need to be spelled differently, SYSCTL_I() >> say, even if SYSCTL_INT() was changed at the same time). > > I'm torn on this one. The compiler knows the type (unless, for > SYSCTL_INT, NULL/0 is used, but that is also a compile-time check), > but to interpret it requires the use of __builtin_foo which is a gcc > extension and not part of standard C. > > Philosophically, while I like this kind of letting the compiler do the > work, if you want C++ you know where to find it. Oops. I think sizeof() and issigned() can be used to determine the type well enough in functions and initialized data (do a fuller type check if the compiler supports it), but I don't know how to do this in static sysctl declarations (since sizeof() can't be used in cpp expressions). Bruce --0-1443270800-1295059378=:16210--