|
Message-ID: <20190710204520.GU1506@brightrain.aerifal.cx> Date: Wed, 10 Jul 2019 16:45:20 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH] Define NULL as __null in C++ mode when using GCC or Clang. On Wed, Jul 10, 2019 at 03:11:30PM -0500, A. Wilcox wrote: > On Jul 10, 2019, at 12:35 PM, James Y Knight <jyknight@...gle.com> 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.