From owner-svn-src-head@freebsd.org Tue Feb 21 20:59:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF348CE8CD1; Tue, 21 Feb 2017 20:59:47 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAF9B14AC; Tue, 21 Feb 2017 20:59:47 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1403) id 1E0247304; Tue, 21 Feb 2017 20:59:47 +0000 (UTC) Date: Tue, 21 Feb 2017 21:59:47 +0100 From: "Piotr P. Stefaniak" To: Bruce Evans Cc: Conrad Meyer , "Pedro F. Giffuni" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313982 - in head/sys/dev: agp al_eth an arcmsr bce beri/virtio bhnd/cores/usb buslogic ce cm cp ctau cx de ed fatm fe firewire hptiop hptmv iicbus isp le md ncr netmap ofw patm pccard ... Message-ID: <20170221205947.GG87692@freefall.freebsd.org> References: <201702200343.v1K3hCk3060716@repo.freebsd.org> <20170221234517.L3157@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9Iq5ULCa7nGtWwZS" Content-Disposition: inline In-Reply-To: <20170221234517.L3157@besplex.bde.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 21 Feb 2017 20:59:48 -0000 --9Iq5ULCa7nGtWwZS Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On 2017-02-22 00:46:31, Bruce Evans wrote: >On Mon, 20 Feb 2017, Conrad Meyer wrote: >> Maybe this is moot. I don't believe any architecture FreeBSD actually >> supports has non-zero bitpattern NULL, but something weird like CHERI >> might. > >Compilers should do portability checks on it. In fact, the convolutions >in this file do little except define nullptr and __null to let compilers >do more checking. Only the C++ case even has them. Compilers can do >most checks using just the C90 definition of null pointer constants. tcc(1) of the TenDRA project can set the null pointer representation to 0x55555555 via -f option of trans(1) (but only on x86): $ cat test.c #include int main(void) { char *x = NULL; unsigned long int y = (unsigned long int)x; printf("%lx\n", y); return 0; } $ tcc ./test.c -o test $ ./test 0 $ tcc -Wt,f ./test.c -o test $ ./test 55555555 See http://www.tendra.org/trans.1/ for more details. --9Iq5ULCa7nGtWwZS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEElaLNZulp/QcHQR2KSnkqwcVL7lkFAlisqjEACgkQSnkqwcVL 7lng3Af/QsjDNjA/K1M1EOkvUqNgU0iOD6fkMk4brIkBUjXQnfp4r4hmZVy2nYxN X3bsJEzyNMm5Wv0U9S5sXDqCp9+kYbEJICHFEnbf4u/LbNMyf4D/3BRdx/dboXm7 AbaTMFiXmJ4/udjpYVJbaJnUxOgK4Ys820aN2zlt0IIXsy3VLYk+h9Je/avuXBGA FbLjGsmDe2jCdDarLuoSmJ0dxR4qkr5/nI+ROm0DwgIPaLYQUkndaq6Ovm2L6fx5 0sGbGlT1mFMAZkozlnhFeXdHvmEKHq6qgYgrxxXCYShTV/nURYYffeNReuJxA1Ii kv4Fu0AUrf2FV105cj7AwaeZO9a5oA== =Fnpe -----END PGP SIGNATURE----- --9Iq5ULCa7nGtWwZS--