From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2548 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: NULL Date: Thu, 10 Jan 2013 00:42:01 +0100 Message-ID: <20130109234200.GN4468@port70.net> References: <50ED4E45.6050801@barfooze.de> <50ED81BF.8030005@gentoo.org> <20130109144712.GY20323@brightrain.aerifal.cx> <50ED8A34.5070904@barfooze.de> <20130109153630.GZ20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1357774944 2835 80.91.229.3 (9 Jan 2013 23:42:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Jan 2013 23:42:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2549-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jan 10 00:42:41 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Tt5Hz-0005wX-Fn for gllmg-musl@plane.gmane.org; Thu, 10 Jan 2013 00:42:31 +0100 Original-Received: (qmail 20122 invoked by uid 550); 9 Jan 2013 23:42:14 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 20114 invoked from network); 9 Jan 2013 23:42:14 -0000 Content-Disposition: inline In-Reply-To: <20130109153630.GZ20323@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2548 Archived-At: * Rich Felker [2013-01-09 10:36:30 -0500]: > question: short of C11 _Generic, is it even possible for a program to > detect whether NULL has integer or pointer type? if it's ok to detect at compile time then it's easy: int a = -NULL; int b = NULL+NULL; int c = NULL+.0f; int d[NULL+1]; int e = 0?NULL:1; these are compile time errors if NULL has pointer type but ok when NULL is integer