From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id CBDC83858C53 for ; Wed, 14 Jun 2023 14:52:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CBDC83858C53 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="6.00,242,1681200000"; d="scan'208";a="8805731" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 14 Jun 2023 06:52:50 -0800 IronPort-SDR: MCU2kU4gIs+rUrE7qO2Kzjh4/HBv16edG4YntfBNhZcYYaCnofVyJner1Q8B7ex37VrTS7DRyR LRrgjkBdJLoBi8MB38T3WRTsiyh3UN9yUEOOswL2CNin4BA0YX/vOY1zYp7bYW8n8CbpzyGZTp A92JHZ/AsOq4rKV0mNO0srepAJrtXnNJZN4saWaeTX/5XaPyjSn+laHGRpmTWJaQgGoHigOKSG YktlbzLxsLrLX8KvkKD1RARaVBbJrAHryYaXb0uCbO4MqnK/+2j5ReaFZJ048F2JDEn2pmv4nx /MU= Date: Wed, 14 Jun 2023 14:52:46 +0000 From: Joseph Myers To: Paul Eggert CC: Jakub Jelinek , Marek Polacek , , Subject: Re: [RFC] Add stdckdint.h header for C23 In-Reply-To: Message-ID: References: <68578b43-939-1879-9676-2ea55249a2c5@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3105.8 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_NUMSUBJECT,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 List-Id: On Tue, 13 Jun 2023, Paul Eggert wrote: > > There is always the possibility to have the header co-owned by both > > the compiler and C library, limits.h style. > > Just > > #if __has_include_next() > > # include_next > > #endif > > I don't see how you could implement __has_include_next() for > arbitrary non-GCC compilers, which is what we'd need for glibc users. For > glibc internals we can use "#include_next" more readily, since we assume a > new-enough GCC. I.e. we could do something like this: Given the possibility of library functions being included in in future standard versions, it seems important to look at ways of splitting responsibility for the header between the compiler and library, whether with __has_include_next, or compiler version conditionals, or some other such variation. -- Joseph S. Myers joseph@codesourcery.com