Date: Tue, 12 Sep 2023 17:24:20 +0000 From: bugzilla-noreply@freebsd.org To: numerics@FreeBSD.org Subject: [Bug 272758] c16rtomb and c32rtomb wrong return value (at least on aarch64) Message-ID: <bug-272758-18636-45FunaoIFC@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-272758-18636@https.bugs.freebsd.org/bugzilla/> References: <bug-272758-18636@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272758 --- Comment #3 from Dimitry Andric <dim@FreeBSD.org> --- (In reply to John F. Carr from comment #1) Yes, setting the mbstate_t to zero is what should be done. Quoting C11 7.29.6: > The initial conversion state corresponds, for a conversion in either direction, to the beginning of a new multibyte character in the initial shift state. A zero-valued mbstate_t object is (at least) one way to describe an initial conversion state. A zero- valued mbstate_t object can be used to initiate conversion involving any multibyte character sequence, in any LC_CTYPE category setting. If an mbstate_t object has been altered by any of the functions described in this subclause, and is then used with a different multibyte character sequence, or in the other conversion direction, or with a different LC_CTYPE category setting than on earlier function calls, the behavior is undefined. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272758-18636-45FunaoIFC>
