From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14384 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker 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 16:45:20 -0400 Message-ID: <20190710204520.GU1506@brightrain.aerifal.cx> References: <20190709193826.GR1506@brightrain.aerifal.cx> <20190710020357.GI21055@port70.net> <871ryycs9n.fsf@oldenburg2.str.redhat.com> <20190710164446.GS1506@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236572"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14400-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 10 22:45:38 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 1hlJT5-000zNp-49 for gllmg-musl@m.gmane.org; Wed, 10 Jul 2019 22:45:35 +0200 Original-Received: (qmail 23827 invoked by uid 550); 10 Jul 2019 20:45:32 -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 23785 invoked from network); 10 Jul 2019 20:45:32 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14384 Archived-At: On Wed, Jul 10, 2019 at 03:11:30PM -0500, A. Wilcox wrote: > On Jul 10, 2019, at 12:35 PM, James Y Knight wrote: > > > > It's a question which is impossible to ever answer in the negative > > -- there always _may be_ any sort of terrible software implemented > > out there, somewhere. But, I do doubt any such relevant compilers > > actually exist. > > Or, put another way, it has always seemed to me that one of musl's > tenets is to "fail fast and break hard" on egregiously invalid code. Code != compilers. We do judge egregiously bad compilers on failing to conform to the documented standards, but there really is no standard for what is "GNU C" (or "GNU C++") except "GCC". The intent has always been clear to require the minimal subset of this needed to work, so that other current and future compilers can be usable without having to clone all of GCC. It's a matter of reducing the barrier to entry, which is already way too high. > I'd argue "pretending to be GNU C++ and not having __null" is much > more egregious than "code still using NULL in C++". Therefore it's > better to break the invalid compiler (which could have any number of > other bugs) than break the C++ code. "Still using NULL in C++" is bad style but valid. Making assumptions that it's valid for terminating variadic lists or that it will have a type that causes particular overloads to get called is what's not valid. Rich