From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28724 invoked from network); 30 Aug 2023 22:05:23 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 30 Aug 2023 22:05:23 -0000 Received: (qmail 24312 invoked by uid 550); 30 Aug 2023 22:05:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 24258 invoked from network); 30 Aug 2023 22:05:16 -0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KggjAfAoQh7aws7/UOp7hz85nI2mJ/SW+eDj4IBn5kvRb2MR9IJVSS5ItRt31WXHRazS/jCLzrmJzb8kUnyBtaz1E57hoVZu1iih8XJYI6QFRIVr3cvlHNPSFAKtNDO9hz9YlVA2zq8OxMyS0iyt8eKtLCj4svggyt9m2tjFMSE4vDtl71gVA6DtAAY3C3/K9OtNhtck09IdnHeHXx3Z+h2EJt6fXhEefXw48TgUNj1TxPWWZk/yieuAL99Fuhg4jAFysuLEcMcINKF6eLsp4CD62upe+3qOIkxYQ/DH/6Ael4OlKGazBE4Bk1VMJSJBEpacjiz3uFibflI5oxs+/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iiQCg/GTbPJJN2OKU0B6oqSxDw11eFzPevVfdE24zj8=; b=To+047+Crgw1T0NPF3y8d6OxLsJa0gxO468pZ3elnEOgA9DA0VzZNBMDUqnGBCWgy4FmHRbaMKfnSVsP9vbP3+/kQu9XrwalAWRCwDYO7it6RDxvRBL1xRhapUBC4Qsr2fulm9r+KNJ/zZWGID/2R2cKM2nMFtooXTEieAWJ/KPW4Y5/Ov8DbTRsJsXztW4ImKRwwmFnN/5SOv/JFQ/H3daXhM/o+DY0HOIk5obBtm9HwehVec6aFKGWFo2TWarEeBLC+NjDvMu8E36HF7YONQLfsRV+RK0yrWXszt7c4wleGgwuuT/5+vTBuPMEscqa41tSR8LX2KEZqs9y048PXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none X-Gm-Message-State: AOJu0YznVeSYdnzYjNqOhwxwyL1iZeEeenrI300H5ixxGhJklq+fwQcj wrquCqQeQXoBYA2dFNtcCSAiay83U8m2CQB5SsY= X-Google-Smtp-Source: AGHT+IF7vBSvq2mJpdfTOcXmQY9ojWa8g3yrOeug9aZtRLFYA+KcI/Cu2n0kMbGoQ+bkoxLWNZNQxQAAtOH6M78WD/U= X-Received: by 2002:a1f:ea43:0:b0:48d:2779:a4f with SMTP id i64-20020a1fea43000000b0048d27790a4fmr3535470vkh.0.1693433101136; Wed, 30 Aug 2023 15:05:01 -0700 (PDT) References: <20230218013333.844224-1-i@maskray.me> <20230218020320.GA4163@brightrain.aerifal.cx> <20230227222653.GI726682@port70.net> In-Reply-To: From: Fangrui Song Date: Wed, 30 Aug 2023 15:04:50 -0700 X-Gmail-Original-Message-ID: Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-TMN: [df7OP0j/724gt9r6CB7i2Qq95PmVwaWv] X-ClientProxiedBy: MN2PR18CA0003.namprd18.prod.outlook.com (2603:10b6:208:23c::8) To DS7PR12MB5765.namprd12.prod.outlook.com (2603:10b6:8:74::19) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB5765:EE_|MW4PR12MB6999:EE_ X-MS-Office365-Filtering-Correlation-Id: 278265f5-c5d7-4338-d07f-08dba9a528e1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Tzfzyvr7ormQoKMZy2fT7YIh7LHPQAoeGJTvYXosPoV6uXiVtnvHi+5crRDZRcNn1IGAb4xm4+IME18UCcfOiJCxEToTWJUMIGl4TtbFzZuccGrHmucNSerUZN91JKUHLlymA7FzB6A+AdkJ/HFzNmTPt3v/NSnb+r/eUN7uvzDDgxcWgRN/TY0ene2Usf6QK+ArOiZOnP/zM78epOGe2ZZ5tLhaU37OZIpC09hj8aQvfZ0h+Cd79cHyZsdttbqQUbQxiOXd4Jnp9RYdAJEuNiTl3Zu+e5gQ1yicI46DyKz3Hl9NWqZnGFG3Kp8HqROwGOY/aPSVLwlpwGSL0ZWTVVduKrBuDs0pA8Zk3rJhgJm6OtyplY5Hdb/Z3w+c1Vy3BC4UnZV1Tucf0NSZD6a+MP8lDlpIUHbuwMl/d1KOMTYSZ5dpLBcoJK/7piCT1+apwrHkzVcAwW4GV8zFcgHN5W5FvK9ChGsgGMDFKAxrRuWITXFmuU2WKvwpDcwkImK/MLWh+rzCA6sNPXMS1rAQfRm947N1myzMPodVlRyhqYvEd4dcSiCNsCbFFJHWgwP8 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V1JMc21MOGpCVUNWTVBHTVNuSm1iODNhekY2cFVpUXdIdTZZdXBYeVhTM0pF?= =?utf-8?B?Y1VhbTA4ampGWGtUWG5HTitPbU02NFpsQTdhTEx4STREcXltbGtvWG15RVh5?= =?utf-8?B?bEpVYzJVSzVsbFJoZ0J4MFdiOVFJWmxLSHN6WGVIdmRPMmp4OW1lNng3N1J3?= =?utf-8?B?dU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Z4RVN6?= =?utf-8?B?Y1RiVHZpZ2wwVEI1dVl6VkxNUzBxWUZBWDhWSVlZeEQybU1CQmJRUyt1Sklw?= =?utf-8?B?QUZRcmc4UHRBK0sybjdhUG1Hd2plODhRUFEveDNTRTFydVYrcDdQL1RldkRh?= =?utf-8?B?aWdKRDNPd0Fpd2hOcUNNMzV0RWUxWW0xVUk4UTU3a2NRdUIrZkhNK2tPS1dr?= =?utf-8?B?VWpzYTdRdDYybHBFNTZVd0VJTVJkek1jbEczbWYzUXA0cVpFRkVHQ3dkUWh2?= =?utf-8?B?TEdpQ0IrNnhjeGMvSmRySlF5WmtYYldGaEhKeVg5MjFMQmNiWG43L2NpRnhp?= =?utf-8?B?N3pVQ3RibEVwTktSbTgwNE5ndG9iUG9BMXlxOG81ditXbU5IRE9vbSsvcm1u?= =?utf-8?B?YUVrZmtFZmduQmJlZHMrdGlPYVIwRXlOSWNaTkRoT2hPY2V2OWY3c2JBOGFH?= =?utf-8?B?dy81UlEyUW9rVmdGcmd0Z2ZVL0t3S3B4ckduT1BWamtER0p3aTF6K2Jxa3pV?= =?utf-8?Q?MSKzO4x++hucjiGSKJRFsTFALhOUhfi29XNA+nhnCcrYK5?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-71ea3.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 278265f5-c5d7-4338-d07f-08dba9a528e1 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB5765.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2023 22:05:02.7380 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6999 Subject: Re: [musl] [PATCH] Use __builtin_FILE/__builtin_LINE if available On Sat, Mar 4, 2023 at 7:23=E2=80=AFPM Zhihao Yuan wrot= e: > > On Thu, Mar 2, 2023 at 12:19 AM Fangrui Song wrote: >> >> On Mon, Feb 27, 2023 at 2:27=E2=80=AFPM Szabolcs Nagy w= rote: >> > > > It is sad that C++ modules broke 'assert' but not surprising. Modu= les were largely created out of aversion to macros. This isn't something li= bc can fix though, I suggest a defect report against C++ instead. >> >> To lichray: ^^ > > > The definition of 'assert' is mandatory only when NDEBUG > is defined as a macro name. 7.2.1.1 reads: > > "[...], if expression (which shall have a scalar type) is false (that is,= compares equal to 0), > the assert macro writes information about the particular call that failed= (including the text of the > argument, the name of the source file, the source line number, and the na= me of the enclosing function > =E2=80=94 the latter are respectively the values of the preprocessing mac= ros __FILE__ and __LINE__ and of > the identifier __func__) on the standard error stream in an implementatio= n-defined format." > > The text in parentheses did not mandate the use of __FILE__ > and __LINE__, and C++ did not permit 'assert' not to work in > modules. Therefore an implementation that fails to compile > the code snippet in the original email is not conforming. >> >> >> > > > Changing the semantics of assert in C seems like a bad thing to do= . >> > > > > > > The semantics is unchanged, and people are doing it: > > Add custom ODR-safe assert. (!1166) =C2=B7 Merge requests =C2=B7 libeigen= / eigen =C2=B7 GitLab > >> >> > >> > i dont see how that solves the fundamental problem: >> > >> > the *behavior* of assert changes depending on which include path is >> > used and thus inline functions that are supposed to be equivalent >> > aren't. (__builtin_FILE makes the pp-token sequence the same across >> > the instances, but the actual code will have different paths, which >> > while not an odr violation per the literal words of the spec, it >> > clearly violates the reason the rule is there in the first place.) > > > This is a different topic. In related news, CWG Issue 2678 (cplusplus.git= hub.io) > will likely need to be revisited (i.e., what does 'odr' mean > is subject to change). Regardless, __builtin_FILE is > a vendor extension and serves customers' needs in > implementing 'assert.' > > -- > Zhihao Yuan, ID lichray > The best way to predict the future is to invent it. > _______________________________________________ Bump:)