From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14373 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Florian Weimer Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] Define NULL as __null in C++ mode when using GCC or Clang. Date: Wed, 10 Jul 2019 08:34:12 +0200 Message-ID: <871ryycs9n.fsf@oldenburg2.str.redhat.com> References: <20190709193826.GR1506@brightrain.aerifal.cx> <20190710020357.GI21055@port70.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="162675"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) To: musl@lists.openwall.com Original-X-From: musl-return-14389-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 10 08:34:29 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hl6BR-000gEJ-Dm for gllmg-musl@m.gmane.org; Wed, 10 Jul 2019 08:34:29 +0200 Original-Received: (qmail 21682 invoked by uid 550); 10 Jul 2019 06:34:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 21656 invoked from network); 10 Jul 2019 06:34:26 -0000 In-Reply-To: <20190710020357.GI21055@port70.net> (Szabolcs Nagy's message of "Wed, 10 Jul 2019 04:03:57 +0200") X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 10 Jul 2019 06:34:14 +0000 (UTC) Xref: news.gmane.org gmane.linux.lib.musl.general:14373 Archived-At: * Szabolcs Nagy: > it is clear that 0L is a conforming definition for all > conforming c++ compilers. > > it is less clear if __null is so in all compilers that > define __GNUC__. Why wouldn't something like this be valid for current C++ versions? static inline constexpr decltype(nullptr) __null{}; #define NULL __null I don't see a requirement that NULL must be an expression that can be evaluated by the preprocessor. Thanks, Florian