From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id B09AA384F00F for ; Fri, 13 May 2022 17:27:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B09AA384F00F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.91,223,1647331200"; d="scan'208";a="75851246" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 13 May 2022 09:27:48 -0800 IronPort-SDR: qrKZ3dZWbn9URAERkpSbbfpN8weaRXVthwPJ7z6ZT2sX33p2wTjKaeCJfh0zhmGe4h6PTazwEN VTm0hnDku51yP4cJcba5JHgJKV6qToWsA2fnCarmzy2UyHbHny1RmRAMc/X3A7YF7m1HD8Mn0h VbJFsZtWJzqr8F00VUiHEvQ6DXStfn5TJRTc8f0VO220y9Zg6VJc48RwQJQpmOeJ+4wdddJS0+ Q6IVsXWZHxE0wP/8JdWyuXZ0ZuOWTLEYOWjI0b0lB/cLkN8kIwK1Dn3JYLYPiLtntIcIa46RCh daE= Date: Fri, 13 May 2022 17:27:44 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Jonathan Wakely CC: , , Subject: Re: [PATCH] Check for ISO C compilers should also allow C++ In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-06.mgc.mentorg.com (139.181.222.6) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3113.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2022 17:27:51 -0000 On Fri, 13 May 2022, Jonathan Wakely via Libc-alpha wrote: > Tested x86_64-linux. > > There is a suggestion[1] to make clang++ stop defining __STDC__ but it's > blocked by this. The clang++ change will still be blocked while old > Glibc versions are still in use, but we can start the clock ticking by > fixing Glibc now. > > [1] https://discourse.llvm.org/t/rfc-stop-defining-the-stdc-and-related-macros-in-c-mode/62468/1 > > >From a quick grep, I don't think any other places in Glibc need a > similar change. Florian pointed out that gnulib overrides > and so should make the same change in its version. The change seems sane. While we don't document what extensions (beyond C90 / C++98) are needed to use glibc's headers (e.g. long long, flexible array members, anonymous structs / unions; in at least some cases, alignment attributes and asm redirection of functions), I see no reason defining __STDC__ in C++ should be such a required extension. -- Joseph S. Myers joseph@codesourcery.com