From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Wed Apr  8 13:31:37 2026
Return-Path: <owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org>
X-Original-To: sc22wg14-domo2
Delivered-To: sc22wg14-domo2@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id 67317356DDB; Wed,  8 Apr 2026 13:31:37 +0200 (CEST)
Delivered-To: sc22wg14@open-std.org
Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178])
	by www.open-std.org (Postfix) with ESMTP id 16224356D2F
	for <sc22wg14@open-std.org>; Wed,  8 Apr 2026 13:31:35 +0200 (CEST)
Date: Wed, 8 Apr 2026 13:31:24 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alejandro-colomar.es;
	s=key1; t=1775647895;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type;
	bh=Tw3Mjl8T5y7ofs18GKOsSmsSyoq/UvCWuCDFVXlu4+o=;
	b=eoobr1PtrVrNvoqz6UbqKk0Nbq4k12gFv530J5M/X/WQ3aclqJiEEcjXPhZJAizZyzRtUn
	m7F3eyhssh1I4z7L4VYk8euUc6eJfWJtT5jdrDoY35pRGp0sIyRZ8vcS2dSM//EzoCAOE6
	v1T4wIB4tepokGdPEbNZCUM0tkyFsuExmhVgRkCWjM6iMIz2RTJimtp7uGa38rb/rX3j6T
	sPxu24r57nShSko71uYITjG53BnOsGy30Bxz++JgYG779S2sZyIipLu38NZmtFB00iNDvZ
	PYOc6tRqryzBqvDorW8r1xAYwsH38FL4fZ1sfOnnL0c0EP1emqlqtbPfiC1oTQ==
X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers.
From: Alejandro Colomar <une+c@alejandro-colomar.es>
To: C Committee <sc22wg14@open-std.org>
Cc: Joseph Myers <josmyers@redhat.com>
Subject: alx-0090r0 - Error returns from specific width length modifiers
Message-ID: <adY7y1-Tyfx1CdOo@debian>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="4bxcsjlcwqfufzau"
Content-Disposition: inline
X-Migadu-Flow: FLOW_OUT
Sender: owner-sc22wg14@open-std.org
Precedence: bulk


--4bxcsjlcwqfufzau
Content-Type: text/plain; protected-headers=v1; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
From: Alejandro Colomar <une+c@alejandro-colomar.es>
To: C Committee <sc22wg14@open-std.org>
Cc: Joseph Myers <josmyers@redhat.com>
Subject: alx-0090r0 - Error returns from specific width length modifiers
Message-ID: <adY7y1-Tyfx1CdOo@debian>
MIME-Version: 1.0

Hi,

Here's a proposal for addressing Issue 1012 from n3773.
I have not included wording for wchar.h and Annex K, as it seems obvious
what to do from the instructions.  I've just written 'Do the same' to
note to the editor that morally the same thing should be done.

I've also applied some refactor, which will make fprintf() and fscanf()
specifications smaller, and thus easier to compare to the other
functions.  The specification of the format strings go to General
sections before the functions.


Have a lovely day!
Alex

---
Name
	alx-0090r0 - Error returns from specific width length modifiers

Category
	Refactor, and fix issue n3773::1012.

Author
	Reported-by: Joseph Myers <josmyers@redhat.com>
	Signed-off-by: Alejandro Colomar <alx@kernel.org>

History
	<https://www.alejandro-colomar.es/src/alx/alx/wg14/alx-0090.git/>

	r0 (2026-04-08):
	-  Initial draft.

Rationale
	See n3773, issue 1012.

Proposed wording
	Based on N3854 + alx-0043.

    7.24.6.1+1  Formatted output functions
	@@ New subsection after title.
	+7.24.6.1+1.0+1  General
	+Description
	+1
	+	The formatted output functions accept a format string
	+	that specifies how the subsequent arguments
	+	are converted for output.
	+
	## Move all paragraphs from 'The fprintf function' Description,
	## except for the first one.
	+
	+Recommended practice
	## Move verbatim from 'The fprintf function'.
	+
	+Environmental limits
	## Move verbatim from 'The fprintf function'.

    7.24.6.1+1.1  The fprintf function
	@@ Description
	## Remove all paragraphs except the first one (p2).

	@@ Recommended practice
	## Remove entirely (move to above).

	@@ Returns
	s/specified/specific/

	@@ Environmental limits
	## Remove entirely (move to above).

    7.24.6.1+1.{2..8}
	@@ Returns
	...
	 or a negative value
	 if an output or encoding error
	-occurred.
	+occurred,
	+or if the implementation does not support
	+a specific width length modifier.

    7.24.6.1+2  Formatted input functions
	@@ New subsection after title.
	+7.24.6.1+2.0+1  General
	+Description
	+1
	+	The formatted input functions accept a format string
	+	that specifies the admissible input sequences
	+	and how they are to be converted for assignmentm
	+	using subsequent arguments as pointers to the objects
	+	to receive the converted input.
	+
	## Move all paragraphs from 'The fscanf function' Description,
	## except for the first one.

    7.24.6.1+2.1  The fscanf function
	@@ Description
	## Remove all paragraphs except the first one (p2).

    7.24.6.1+2.{2..7}
	@@ Returns
	...
	 or even zero,
	 in the event of an early
	-matching failure.
	+matching failure
	+or if the implementation does not support
	+a specific width length modifier.

    7.33.2  Formatted wide character input/output functions
	## Do the same.

    Annex K
	## Do the same.

--=20
<https://www.alejandro-colomar.es>

--4bxcsjlcwqfufzau
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmnWPIwACgkQ64mZXMKQ
wqkuAw//RMJP2FWWv93IfIR/+N6EU6o4Hm8S41r6ji5ztJqtkLXEEdTtZLg63iGK
BCtqaAEIP+MpCmEG98Q7Nn1P5ZAv3Xgo9ChpdzWe3M0PCVO3ZFmZRZGQ2+ZiZiBn
WkQEO5Npf6QclNo47/4WPbcWkdK9fw5Q5ro2Q1BjcsfC9QPl7RhFl7FFhy+ZBJcW
j74GkZgia2qykeh1l+mVq7OFLplwyNz1UHDIHzArJqdbQ0lTow/fxeMKISOOH90F
VUPM0P3MqU4jfpPq3W20pKCHCvUP/jdhqsYS9HBpdZk++luRdZ0k+g7yfr+7Ftyh
4JyIfy91t9Uwe0lmbHJGDVAn+5jUCMKjUaprMCd3Eo9QntBdojn0AE/BfIH+7JZl
USGYeaoxPy4b5lgi7xkUv215C2+PP9yMTcuXeCmc0WQSBkIFKf+HVZqXW9eI4xcA
05HRF9UeGbarEDbzCZ8akJiMaZVKLVz7X/GvMEM1kuFMgFDiQgu5CDZIIgEDztkt
2K7hiHycIWHlvFKN7CDJl/d+pCFxoHGJmReM2+lkPIeDxRzTxXtiqKf0r3o7OdwP
FLUEToY8x9zt22YDqKnPKvyk8YyLrZXPT4ePF52vX6nH90k1aXK0mdr4H8C1JDj/
FVLezou5N+dK62f7ub/VCnoNTH4v456+aRsZb2DIThkWcVgS1/8=
=KhdG
-----END PGP SIGNATURE-----

--4bxcsjlcwqfufzau--
