From patchwork Tue Sep 29 22:40:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Nicoara X-Patchwork-Id: 144938 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 85B5C4B99F5A for ; Tue, 29 Sep 2026 22:38:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85B5C4B99F5A Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=thinkoid-org.20251104.gappssmtp.com header.i=@thinkoid-org.20251104.gappssmtp.com header.a=rsa-sha256 header.s=20251104 header.b=smmXxpGi X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk2-x0d.google.com (mail-qk2-x0d.google.com [IPv6:2607:f8b0:4864:34::d]) by sourceware.org (Postfix) with ESMTPS id 8B3DF4BAE7CB for ; Tue, 29 Sep 2026 22:38:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8B3DF4BAE7CB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=thinkoid.org Authentication-Results: sourceware.org; spf=none smtp.mailfrom=thinkoid.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8B3DF4BAE7CB Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:34::d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790721490; cv=none; b=dLJXBWZV4aBlanWhGqgD6zKgMzkxLoyHbUE/PxqN8YQVtMA1O4bMlPmRJn5IAHTIW2duNEodA+BsE/gZCu97RdK+XppwFSB9mI9a3FrmAe3A/VG8C5HbC4ImwNLp5xwrRZed4voGLN45BfAWO8lofo3mA2B4gqnq6164hQ8u4pk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790721490; c=relaxed/simple; bh=1+ZYImQF+hFbOzNMdhc7onqfWFEDw3yTH2CYDagtark=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VUK4yz9ZNmkzMNx45PASayY/UUU4aMIIKX7sNZ/pz3pdCKPZuDAPyGB18+YSiR8n/Ju6d5SsdpyAkKnp3bDhJJA2v0FBrX6nxRQ5Syu/EOkcLylkiShstZQ7zYxonQsh7y3mTM5HOynxI7bCzXorLbDzLlKntipdiXMBhVH+zoI= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=thinkoid-org.20251104.gappssmtp.com header.i=@thinkoid-org.20251104.gappssmtp.com header.a=rsa-sha256 header.s=20251104 header.b=smmXxpGi DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B3DF4BAE7CB Received: by mail-qk2-x0d.google.com with SMTP id af79cd13be357-93c599e3902so406693285a.2 for ; Tue, 29 Sep 2026 15:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thinkoid-org.20251104.gappssmtp.com; s=20251104; t=1790721490; x=1791326290; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=ddni2IYYz7p9nILWaqK1mUaGwb6NCCzw1td8BB5AG6g=; b=smmXxpGinoDaHTPWWUkT+x4b2HhIe14qVDiQAVtKdvYn6+suFVK7st4izY5uVSaJxX UzLd9EwFqrOyrQfoyGrqOUGaYUKZ32vAFOTmAG+EbSIfx0SMYcQBydv/SUiUhFcUqDf/ 1I4yc5ekRJpBTljsbP6XzZepV4eXF5vo+bly1Qitj04gAYwORXJmcO/AX6xRO3QjoLKQ AQB0OrwAhbpq+a1NQy5cUJyHb8GdSNnNv6hoQFW8eTNblOxjuHkm3Dd/M7wSuFQjOnTv 4YePMfVYoRM/lL6m9V/myju6X2OPug5s2HrWieIYGATVv/M7qwvMpdEGMsMqkTD4PYYr gypw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790721490; x=1791326290; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ddni2IYYz7p9nILWaqK1mUaGwb6NCCzw1td8BB5AG6g=; b=RtbX51JxAmLQ1U6X9F6R72cjbwEOLl66QB0+BsFRAgqKVn+zotDuabGE645SYSJPT6 10OmCJkBgyq5r4RJ6CTL0VIPXglt4pZfjlrXf8qXf1rRuH/2ToUlw7X8Qe31Maa84vuq +GRo/vygRc7x14zrTKlPrO0eo0z8QrCFVngLGgZqK+yGVgXOTV2NVolj4autTtvcf371 k50m2TnkI3/JjyHMHhS0RasV28ZCF20QSV04YsTlY/ryTyTCyNZ06I0MYtKqVagGfsTU CThqcxsOARVAlLf94BZYT/cgGgY0Aezb5+AeO8lxRYbtgf134LOUhxHDrRCZMQiNI9Yy rTcA== X-Gm-Message-State: AFuF++mcjOIflDKVGbh4YaPuSt1LB8JBOJTPNrMNI0sBAzg/Es1NrdVi mnlOZU3i7HWF8TP8Fnc9og21h1lv2ip8cjCsJ/xxQcdN5D92sMhnj3PQusaH/VbOxvsv31Y6HpH SlBIg+gg= X-Gm-Gg: AYBFou347IM16/M0eXEp6V6b/EDHz+pb7H5SXkKLjw5jqWpYghQD88W6n/eoDsrubGc 0dOj3RYycrbSmyKVTghcZZMLAbS14eHc+bEB0mTsceUdwFXKH3i4GAl8Od7n3SAe+5ORsqyECSY uMj/k9u7IbSPhDkKDGFdgq06gbw1oHeNPaVJNDdgR6VhTIfzPqxuEcEOpVcUud6fVUo/ugJl51C ICpk48BGWFzKJpz6yE2+oBzBmBo/VEXM36MIXGgouMSx8DB9jYMAniyH1e4jlzIKx7kPjwaBczw +FmqwGQ0zPVQ3n/cCMtgIXZgh1Dy6yo04ELakNXHWEiZg5UtbgYiHWnr9HkD7u3kbfzgSQmgD/Z 0JmlgOnt2sVqCnboFfl1cejnIoywYhfBcPcxIxOVYbvtl7OD+nsjHQxyzNVAznAYi+rd8iD2AAw 9c78NQYX15DfJNT8ggcrf660gnLS/lk0ZooutCStCXWQlE0rMguKQ= X-Received: by 2002:a05:620a:d96:b0:939:6dea:374a with SMTP id af79cd13be357-93c9fbd9b22mr199820885a.46.1790721490026; Tue, 29 Sep 2026 15:38:10 -0700 (PDT) Received: from behemoth ([2605:a601:a61d:7a00::6]) by smtp.gmail.com with ESMTPSA id af79cd13be357-93c9f4624f2sm75159985a.11.2026.09.29.15.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2026 15:38:09 -0700 (PDT) From: Liviu Nicoara To: libc-alpha@sourceware.org Cc: Liviu Nicoara Subject: [PATCH] : Define __CORRECT_ISO_CPP_WCHAR_H_PROTO for Clang [BZ #34692] Date: Tue, 29 Sep 2026 18:40:14 -0400 Message-ID: <20260929224014.12925-1-lnicoara@thinkoid.org> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_PBL, SPF_HELO_NONE, SPF_NONE, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Without the asm redirects, wcschr et al. are not const-correct. Commit 953ceff17a4a15b10cfdd5edc3c8cae4884c8ec3 widened the guard of __CORRECT_ISO_CPP_STRING_H_PROTO in to Clang 3.5 and later [BZ #25232]. kept the guard it had since 2009, so under Clang with libstdc++ or with just the C headers, wcschr, wcspbrk, wcsrchr, wcsstr, wcswcs and wmemchr have only the C prototype. A const wchar_t * argument then yields a wchar_t * result without a diagnostic. This change applies the condition to . It does not impact GCC. Checked on x86_64-linux-gnu with GCC 16.2.1 and Clang 22.1.8. Signed-off-by: Liviu Nicoara Reviewed-by: Adhemerval Zanella Reviewed-by: Adhemerval Zanella --- wcsmbs/wchar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index 4709c210fb..ba5a884a40 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -65,7 +65,8 @@ typedef __gnuc_va_list va_list; #endif /* Tell the caller that we provide correct C++ prototypes. */ -#if defined __cplusplus && __GNUC_PREREQ (4, 4) +#if defined __cplusplus && (__GNUC_PREREQ (4, 4) \ + || __glibc_clang_prereq (3, 5)) # define __CORRECT_ISO_CPP_WCHAR_H_PROTO #endif