From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11752 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: stdbool.h does not define _Bool when included by C++ code Date: Fri, 28 Jul 2017 09:01:01 -0400 Message-ID: <20170728130101.GY1627@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1501246888 14379 195.159.176.226 (28 Jul 2017 13:01:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Jul 2017 13:01:28 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-11765-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jul 28 15:01:13 2017 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.84_2) (envelope-from ) id 1db4tB-0002t6-Q5 for gllmg-musl@m.gmane.org; Fri, 28 Jul 2017 15:01:09 +0200 Original-Received: (qmail 15663 invoked by uid 550); 28 Jul 2017 13:01:13 -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 15640 invoked from network); 28 Jul 2017 13:01:12 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:11752 Archived-At: On Fri, Jul 28, 2017 at 10:21:10PM +1200, Michael Clark wrote: > Hi, > > I noticed an issue with the musl headers when installing > compiler-explorer for RISC-V. Try compiling this code with g++ and > musl's stdbool.h > > - https://cx.rv8.io/g/Bc3AwY > > Compiler explorer uses the C++ front-end to the compiler by default > > It seems the musl stdbool.h defines bool in terms of _Bool for C, > but does not define _Bool in terms of bool for C++. > > The gcc stdbool.h header handles both conditions and when included > by C++ code it has #define _Bool bool but notes that it is a GNU > extension. I see; this is probably why I wasn't aware of it. I don't think it would be objectionable to add. Rich