www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/05/30/23:42:55

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 64V3grNO2637365
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 64V3grNO2637365
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=XgeJmHQg
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 729C54BA2E31
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1780198972;
bh=BJrFzrzBNLYpzd6V53MeRX09G28zNULDWdSMEbzo2+0=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=XgeJmHQgbyLPIJeWPuXLpL7yrk8+dH3n4I2d4gF5dLmScKhmLjU66DNG3fG9bD6hv
+nI4lIXKiAAYSoNtKbOrDpRzh0Tk+r5yYjsPOyV9YOWZ9ihSzMOVLNzKztGFEZ6vA6
E80dVT0C4/Lkyb/W/CHvAl7Qe+AyH7FwTLs3XLNk=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 891A44BA798D
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 891A44BA798D
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780198952; cv=none;
b=AFrWNt1cim9LtEQJWqHOG6SS8A8/hpsvogeXphLaEEwo2v4Wo/8cLhljfWDeQ8MnNGP9nPzqfAuQtzEIi+wyPhgOriRnEzYs57gAaPWPODqMHvZYZtkSxfUmNyMdzVaFde3xl8Y7rdAuXo97eM4qrILsgjdilq8N2zeDVhK32xI=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1780198952; c=relaxed/simple;
bh=bJefK9B/Bl58G8nK72pA6C5Sky+9lV9kbdXeHsS1vUQ=;
h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature;
b=xQuF0auPpmxSf/DeANptCyUSHZc9zgjLP/f3HwvRMZmdAv8FJbi7vyQHGHVAF+B8si5cLM1iWpR7bGYZ3YF6p2VQ3Nnhenwt35j5auT9kSGAOzOpIThSnJIMYltCTNxqO7BSv2PJy+AHGFolDEt36L6z3X0ctLzZiBRHPCUTqqw=
ARC-Authentication-Results: i=1; sourceware.org;
dkim=pass (2048-bit key, unprotected)
header.d=SystematicSW.ab.ca header.i=@SystematicSW.ab.ca header.a=rsa-sha256
header.s=he header.b=k0SSzt5R
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 891A44BA798D
Message-ID: <20f6def3-3b3d-4fac-9b04-df3e035b0632@SystematicSW.ab.ca>
Date: Sat, 30 May 2026 21:42:29 -0600
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: wcwidth broken with gcc 16
To: General Cygwin discussions and problem reports <cygwin AT cygwin DOT com>
References: <a9676834-0368-4a8a-88b0-da5e9483b536 AT towo DOT net>
<874ikpawdk DOT fsf AT Gerda DOT invalid>
<8ff2ab8d-dfdc-459c-96f3-ed4a4f451440 AT towo DOT net>
<0140C1F4-CA22-46DE-AE21-69C5427C59B5 AT unified-streaming DOT com>
<e94174b7-ea9b-45ca-bfd3-7979ce988920 AT towo DOT net>
<e362b49c-521c-4cd5-8963-c17d5770619b AT SystematicSW DOT ab DOT ca>
<fbbeb91a-4c5a-dbe6-1bb3-206cf14a73bc AT wisemo DOT com>
<4f885156-7772-43d7-ab72-c88f0a7d1e52 AT towo DOT net>
<112594ad-3c25-4dad-b1bc-071b4951ed98 AT towo DOT net>
<97f0f3c6-9f2c-429c-aa8e-875b7806b275 AT towo DOT net>
<8733z9jpfj DOT fsf AT Gerda DOT invalid>
<b70d8366-8970-4cdc-a693-6d826fe76277 AT towo DOT net> <87o6hw23tp.fsf@>
Organization: Systematic Software
In-Reply-To: <87o6hw23tp.fsf@>
X-Rspamd-Queue-Id: 717FF1A
X-Stat-Signature: k6i8m78nd8odenfo9prhkznhefkp7d3t
X-Rspamd-Server: rspamout01
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX18Zde862bjFSnndkDqyybe7qL8ZZR6m0zA=
X-HE-Tag: 1780198950-208833
X-HE-Meta: U2FsdGVkX1/JGr0CRuBJDStmGMB7ClhpjCwHNUoRjw0VA983OrVWxZEoegtbNYxavWHgh/8tTz8EgBcVpBPxSSVa0Cr79mibqNToA93Kt9hFXks77NhSV+gjQHND/cdHZXMjt5VLIveY05LqWHae2+nid5fG78d8c6Sw02D5WbkUugl2j5yKhrjKqm2RvFxAdg92eD5YciSW6pxjQGlQtZRyBFg2MISqCaAZwAgbnA+zRWjRqi18RYdGyQmzyiGsM5hzRJHaSev33uszwGy59tNEOC+qX4+OyoR+9F0SnCrrbJJNHwEjvvugGQjbiJrH6nYWVyHv+44WtWPiAZVoM+V/k11D0k/Wr+qBjI3OW/Kl3tihNb9tF7mDBi31L2jApe6ScEtEulOGYYWwlesajGyunD6jBtxb+uYm+2i99Sd4+ENOd8YQKbk5ztxe/ADbuXoQHBd6zng=
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: General Cygwin discussions and problem reports <cygwin AT cygwin DOT com>
Cc: Brian Inglis <Brian DOT Inglis AT SystematicSW DOT ab DOT ca>, newlib AT sourceware DOT org
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 64V3grNO2637365

On 2026-05-30 11:40, ASSI via Cygwin wrote:
> Thomas Wolff via Cygwin writes:
>> The patch is already on the newlib mailing list.

	[PATCH] wchar.h: tweak wcwidth prototype parameter wchar_t -> wint_t

> The input parameter is supposed to be wchar_t, not wint_t (per POSIX and
> also the previous implementation), so I'd leave that alone.

>> Yeah, I forgot to type-extend also the include file back in 2018 :-(
>> but that made no difference so far, only now in gcc 16, as explained
>> by Drea in that issue:
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125451#c16
> 
> Just pun the type in the stub implementation, which would automatically
> happen (I think) since there's already an assignment of the input
> parameter from the POSIX wcwidth (wchar_t) to a local variable that has
> type wint_t.  And since that's not a function call but an assignment,
> the promotion rules should be correct for your application without any
> cast.

Both the man doc and definition in newlib/libc/string/wcwidth.c need
wcwidth (wint_t) changed to the POSIX 8 SUS V5 specified wcwidth (wchar_t);
newlib/libc/include/wchar.h is quite correct and okay as is!

	https://pubs.opengroup.org/onlinepubs/9799919799/functions/wcwidth.html

The standard definition prohibits WEOF, but allows null, non-spacing, or 
printable wide-character codes, corresponding to a valid character in the 
current locale, to be passed.
POSIX return codes are defined differently from __wcwidth results.
No errors are defined, and on valid input, errno is not changed.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019