question on conversion specification implemented in newlib

Can Finner can.finner@gmail.com
Wed May 9 09:21:00 GMT 2012


Hi,
I noticed that there is below sentence in C standard:

Each conversion specification is introduced by the character %. After
the %, the following
appear in sequence:
— Zero or more flags (in any order)
— An optional minimum field width.
— An optional precision
— An optional length modifier
— A conversion specifier 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.



More information about the Newlib mailing list