https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125451
Bug ID: 125451
Summary: wcwidth broken with gcc 16 on cygwin
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: towo at computer dot org
Target Milestone: ---
Created attachment 64548
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64548&action=edit
test program with broken invocations of wcwidth
For a number of character ranges, mainly (but not only) from CJK ranges,
wcwidth incorrectly reports width 1 instead of 2, 0, or -1.
Test file attached.
This happens with gcc 16.0.1 as available as a test package in cygwin.
Reported to cygwin: https://cygwin.com/pipermail/cygwin/2026-April/259597.html
I am puzzled as I see no cause of this behaviour, no define or typedef that
might divert from newlib/libc wcwidth, and that would clearly deliver the
proper values.
Apparently it happens only on cygwin
(https://cygwin.com/pipermail/cygwin/2026-May/259661.html) but there is no
apparent reason why it should have changed from earlier versions of gcc;
cygwin-provided libc-wcwidth has not changed
(https://cygwin.com/pipermail/cygwin/2026-May/259667.html).