From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 10:48:58 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 5B8EB1065674 for ; Wed, 30 Apr 2008 10:48:58 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by mx1.freebsd.org (Postfix) with ESMTP id EE84A8FC21 for ; Wed, 30 Apr 2008 10:48:57 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id 3C3C317B595 for ; Wed, 30 Apr 2008 12:48:56 +0200 (CEST) Received: from marvin.blogreen.org (marvin.blogreen.org [82.247.213.140]) by smtp3-g19.free.fr (Postfix) with ESMTP id 22CDA17B592 for ; Wed, 30 Apr 2008 12:48:55 +0200 (CEST) Received: by marvin.blogreen.org (Postfix, from userid 1001) id B72175C05D; Wed, 30 Apr 2008 12:48:55 +0200 (CEST) Date: Wed, 30 Apr 2008 12:48:55 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: hackers@freebsd.org Message-ID: <20080430104855.GA26622@marvin.blogreen.org> Mail-Followup-To: hackers@freebsd.org References: <20080426213557.GA88577@marvin.blogreen.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-PGP-Key: http://romain.blogreen.org/pubkey.asc Cc: 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: Wed, 30 Apr 2008 10:48:58 -0000 --17pEHd4RhPHOinZp Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 27, 2008 at 03:38:54PM -0500, Joshua Isom wrote: > The man page for indent does say "it has a 'forgiving' parser" so I=20 > don't see why it can't just treat any token starting with a zero as=20 > special, treat 0b01, 0x0A, 0f4 and 010 as a number regardless of the=20 > base, even if it doesn't know the base. I think indent(1) has to check the base in order to split tokens consistently. Consider the following statements: read | write | description --------------+---------------+----------------------------- 42 | 42 | Decimal 42e+3 | 42e+3 | Decimal 042 | 042 | Octal 042e+3 | 042e+3 | Octal?? gcc compiles this but the result | | looks strange... 0x42 | 0x42 | Hexadecimal 0x42e+3 | 0x42e + 3 | Hexadecimal + Decimal IMHO, checking numbers base is a requirement for splitting tokens wisely. Regards --=20 Romain Tarti=E8re http://romain.blogreen.org/ pgp: 8DAB A124 0DA4 7024 F82A E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --17pEHd4RhPHOinZp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkgYTpcACgkQ2OmjP/9W/0NuUwCfdrrXJXD1omAv7BdXrnGHhNfA 4L0AoI/mhXF2ZOajX2vTYhpPmF4GGk28 =zjZp -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp--