This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
question on conversion specification implemented in newlib
- From: Can Finner <can dot finner at gmail dot com>
- To: newlib at sourceware dot org
- Date: Tue, 8 May 2012 17:20:31 +0800
- Subject: question on conversion specification implemented in newlib
Hi,
I noticed that there is below sentence in C standard:
Each conversion speciïcation is introduced by the character %. After
the %, the following
appear in sequence:
â Zero or more ïags (in any order)
â An optional minimum ïeld width.
â An optional precision
â An optional length modiïer
â A conversion speciïer character
As quotes, the five kinds of character should appear in sequence, so
it is undefined
behavior if they are not in sequence?
I noticed that following codes works fine with newlib,
fprintf(stdout, "%*.*-d\n", 100, 10, 32);
Any help? Thanks.
--
Regards.