From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 6AE1B28E90 for ; Mon, 26 Feb 2024 04:47:38 +0100 (CET) Received: (qmail 18260 invoked by uid 550); 26 Feb 2024 03:44:05 -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 18221 invoked from network); 26 Feb 2024 03:44:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708919245; x=1709524045; darn=lists.openwall.com; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=wU8fjSWbUfQSYV4mUX0qltRsaDMThBZlPaAf8t4Z2sQ=; b=UEgCgkXioOs90/ri5fxBOGETpUaaEhnc2tqRgJzYwRc1Vfct+ghI00yK8jzdgVDmQi 4RNoBoWP0sTJZ+54lzoVcsM0gf4qdj9ZWew5ULpPj7vpkn9RFLPv5I5+U8/K6orgf9HL s9OEHpsukjvgn3BD8VGMH1OTGfeLVVcw9xJesInNnCNiCKnAiIVIXXXYCv7TYDItT7mK QtFR0xuzUXUR07WREAkeqO/nPQzCNh1f0uMsKerQtkMQmd3EI8sIZG/zAZWJmUN6WV0w FoMWsZmXfAOUmWz3GAFsKItlj1fzF5lGCag1tlF7vTDRMZlQ/hhfxZvpu5zkcLTzDxTX wZGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708919245; x=1709524045; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wU8fjSWbUfQSYV4mUX0qltRsaDMThBZlPaAf8t4Z2sQ=; b=ZTX6YuU6Z8jplQ9+BFimeaCxQ+bVnocNrjkpHx2CWP850kZ7xMPZPNQUwEy1iH2uK1 gUUsS4df7S3Ntq8Yppru7ESP0SmVen0XMDumRJusz0ptOGvJc+WJf/4UMkWU7lJGLpte XF6dBg9umXYdpKKpQnZfqkHilkWD+Lv9EZLAZyX+Hv/sBQH7c5VLZ861rk3jffFZh+zy r2fncIJiCrNsM2D1+gjY9LlaOUkU5g/YWyzxKzApcEwy7cse6N9ff0n2Qm+k+LGeruOn mqkqQo4uogv5xLMuFMAGeId4ighCGCDguszjID3jFhsC5zsI6h94SCBsn8wa4kDdSvP8 RyFA== X-Gm-Message-State: AOJu0Ywqx3rwM0h0GB7WTBEWjhkD5CDiEHHGmNORQv79Xvc1njSoCG8h e9HQ6H6D0mvZB+dIo5DDUc8SaOdziGfbFExbTm2apVsTBtvRfjY47dwUXoT2oc8= X-Google-Smtp-Source: AGHT+IHNqLwIywUynv2WunQj6Wn3gL+d/whw35lzNIPaYefzsB7bic4r6INLiIHG2g4ipd3Evt3gUg== X-Received: by 2002:a05:6000:923:b0:33d:365a:64ce with SMTP id cx3-20020a056000092300b0033d365a64cemr3780098wrb.34.1708919244744; Sun, 25 Feb 2024 19:47:24 -0800 (PST) Message-ID: <0a3fb421-dc8f-4cbb-97e3-b11cc7608d24@gmail.com> Date: Mon, 26 Feb 2024 03:47:22 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: musl@lists.openwall.com, Rich Felker , Jules Maselbas References: <20240125141440.13906-1-jmaselbas@zdiv.net> <20240226021749.GG4163@brightrain.aerifal.cx> Content-Language: en-US From: Gabriel Ravier In-Reply-To: <20240226021749.GG4163@brightrain.aerifal.cx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [musl] [PATCH v2] prevent from redefining __STDC_UTF_{16,32}__ macros On 2/26/24 02:17, Rich Felker wrote: > On Thu, Jan 25, 2024 at 03:14:40PM +0100, Jules Maselbas wrote: >> Undefine any previous __STDC_UTF_{16,32}__ macros before defining >> them to prenvent any warnings of redefining macros. >> >> --- >> v2: >> - changed `#if !define(...)` guard to `#undef`, as suggested by Rich Felker >> >> I encountered this "issue" trying to compile a program with the -isystem >> option to override toolchain/installed musl headers with one from source. >> >> include/stdc-predef.h | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/include/stdc-predef.h b/include/stdc-predef.h >> index af1a2799..5ccd884d 100644 >> --- a/include/stdc-predef.h >> +++ b/include/stdc-predef.h >> @@ -7,7 +7,10 @@ >> #define __STDC_IEC_559__ 1 >> #endif >> >> +#undef __STDC_UTF_16__ >> #define __STDC_UTF_16__ 1 >> + >> +#undef __STDC_UTF_32__ >> #define __STDC_UTF_32__ 1 >> >> #endif >> -- >> 2.43.0 > I merged this, but now gcc warns about undefining them if system > header warnings aren't suppressed. I'm not sure what the justification > is for that... *sigh* > > Rich It appears as though since 2001 GCC makes it so that any redefinition or undefinition of any macro with a name starting with "__STDC_" (with hard-coded exceptions for __STDC_FORMAT_MACROS, __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS) always results in a warning (from reading the code this doesn't seem to be tied to any -W switch, so it's simply entirely impossible to work around)