From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 10:23:41 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10155106566C; Sun, 27 Apr 2008 10:23:41 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 8ECD58FC12; Sun, 27 Apr 2008 10:23:40 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m3RAKv8v027519 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 Apr 2008 20:20:59 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m3RAKv4s007751; Sun, 27 Apr 2008 20:20:57 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m3RAKr9M007750; Sun, 27 Apr 2008 20:20:53 +1000 (EST) (envelope-from peter) Date: Sun, 27 Apr 2008 20:20:53 +1000 From: Peter Jeremy To: Max Laier Message-ID: <20080427102053.GA7293@server.vk2pj.dyndns.org> References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline In-Reply-To: <200804270201.53271.max@love2party.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Romuald Conty , Romain =?iso-8859-1?Q?Tarti=E8re?= Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 10:23:41 -0000 --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 27, 2008 at 02:01:53AM +0200, Max Laier wrote: >On Saturday 26 April 2008 23:35:57 Romain Tarti=E8re wrote: >> I'm using avr-gcc from the ports and relying on the 0b prefix notation >> for binary constants, that is: >> >> foo =3D 0b00101010; =2E.. >I can't think of a case (outside of "0x...." context) where "...0b..."=20 >would be valid C code, let alone better formated as "...0 b...". Hence I= =20 >see no harm in adding your patch to the base indent(1). > >Does anyone have an example where "...0 b..." is valid C code? More relevantly (and excluding avr-gcc) , 0b00101010 is not a valid token as is, whereas "0 b00101010" may be (if b00101010 is a macro). By inserting whitespace, indent(1) is changing the syntax of the input and, IMHO, indent should not be doing that - its brief is to re-arrange whitespace to (hopefully) improve legibility, not make syntactic changes. I would support changing indent to bring its tokenisation more into line with the C preprocessor. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkgUU4UACgkQ/opHv/APuIe2YACgkL3CFfuvqkw3tXbPQjCC2cc0 jUAAmwS93tXcJN/CJQVbJTDMcIbYRZ5k =rkOf -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z--