From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id ACE2B3858C36 for ; Mon, 16 Jan 2023 19:23:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ACE2B3858C36 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.97,221,1669104000"; d="scan'208";a="93548526" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 16 Jan 2023 11:23:48 -0800 IronPort-SDR: 3DwdxaWhrooMWYca3ijhzWdf/UGndcgsdprVSXD5A+BZ6h8HKgQW5NILLvGFIMulcqqYID/2lI SRMdMj9siDDnb/j6NDYmXZ0c6jEq64PNPG7n3ypzEFPAWqcuqw0yK0q6Cy4GjlgNgoVOkK2tn9 XGJTlEGUjY54h+0X9S4pA44MRJ5lMeuFsOPbgWxxlV4eB3NPC6VS71KhCELTUDHLlprMgrPjoM NMxzveB/dIlG+iX0aeePEEJLFPYLmM8fXKe0suG48tKoJIzDFsi7YTjCLeUZExvtgY1gL2mJWo VdA= Date: Mon, 16 Jan 2023 19:23:43 +0000 From: Joseph Myers To: Adhemerval Zanella Netto CC: , Carlos O'Donell Subject: Re: [v3] C2x strtol binary constant handling In-Reply-To: <75b666f9-8a57-62a5-d6d5-81e5919ad264@linaro.org> Message-ID: References: <9dd1d581-2684-43cc-3d44-3d866b226c20@codesourcery.com> <633d137b-f2c2-bfd7-5551-eb4bb73ae119@codesourcery.com> <8feb794b-7d20-2ba0-1a7a-62f8c9919cba@codesourcery.com> <75b666f9-8a57-62a5-d6d5-81e5919ad264@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3108.9 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP 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 Mon, 16 Jan 2023, Adhemerval Zanella Netto via Libc-alpha wrote: > I wonder if could reduce the required new symbols for architecture where > 'long' and 'long long' have the same size, so the REDIRECT macro would > redirect both strtol and strtoll to __isoc23_strtol. I am not if the > complexty really pays off. In Carlos argued against redirecting strtoimax strtoumax wcstoimax wcstoumax to functions such as __isoc23_strtoll rather than adding functions such as __isoc23_strtoimax. I think the same argument would apply to having a single underlying function for both strtol and strtoll (with the additional point that redirecting to a function with a different type is awkward, in the case where __REDIRECT isn't defined and in the case of internal uses in libc where #define is used because __REDIRECT and libc_hidden_proto don't interact well). > > +# Some versions of GCC supported for building glibc do not support -std=c2x > > +# or -std=gnu2x, so the tests for those versions use -std=c11 and -std=gnu11 > > +# and then _ISOC2X_SOURCE is defined in the test as needed. > > +CFLAGS-tst-strtol-binary-c11.c += -std=c11 > > +CFLAGS-tst-strtol-binary-c2x.c += -std=c11 > > +CFLAGS-tst-strtol-binary-gnu11.c += -std=gnu11 > > +CFLAGS-tst-strtol-binary-gnu2x.c += -std=gnu11 > > + > > > > # Run a test on the header files we use. > > tests-special += $(objpfx)isomac.out > > Ok, I think it should cover all possible scenarios. Should we also add tests to > use the expected -std= (it would most likely require a new configure switch to > check for compile support)? I'm dubious of the value of adding such a new configure test at this point. -- Joseph S. Myers joseph@codesourcery.com