On Thu, 1 Oct 2020 at 11:25, Alejandro Colomar via Gcc <gcc@xxxxxxxxxxx> wrote: > > Signed-off-by: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx> > --- > man7/system_data_types.7 | 76 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 76 insertions(+) > > diff --git a/man7/system_data_types.7 b/man7/system_data_types.7 > index a301c2309..07de6417f 100644 > --- a/man7/system_data_types.7 > +++ b/man7/system_data_types.7 > @@ -329,6 +329,82 @@ C99 and later; POSIX.1-2001 and later. > See also: > .BR imaxdiv (3) > .RE > +.\"------------------------------------- int_fastN_t ------------------/ > +.TP > +.IR int_fast N _t > +.RS > +Include: > +.IR <stdint.h> . > +Alternatively, > +.IR <inttypes.h> . > +.PP > +.IR int_fast8_t , > +.IR int_fast16_t , > +.IR int_fast32_t , > +.I int_fast64_t > +.PP > +The fastest signed integer type > +of a width of at least N bits, > +N being the value specified in its type name. > +According to the C language standard, they shall be > +capable of storing values in the range > +.RB [ INT_FAST N _MIN , > +.BR INT_FAST N _MAX ], > +substituting N by the appropriate number. > +.PP > +The length modifiers for the > +.IR int_fast N _t > +types for the > +.BR printf (3) > +family of functions > +are expanded by macros of the forms > +.BR PRIdFAST N > +and > +.BR PRIiFAST N > +(defined in > +.IR <inttypes.h> ); > +resulting for example in > +.B %"PRIdFAST64" > +or > +.B %"PRIiFAST64" > +for printing > +.I int_fast64_t > +values. > +The length modifiers for the > +.IR int_fast N _t > +types for the > +.BR scanf (3) > +family of functions > +are expanded by macros of the forms > +.BR SCNdFAST N > +and > +.BR SCNiFAST N, > +(defined in > +.IR <inttypes.h> ); > +resulting for example in > +.B %"SCNdFAST8" > +or > +.B %"SCNiFAST8" > +for scanning > +.I int_fast8_t > +values. > +.PP > +Conforming to: > +C99 and later; POSIX.1-2001 and later. > +.PP > +Notes: > +Some of these types may be optimized for size > +instead of raw performance. I'm not sure what this tells me as a programmer. What does "raw performance" means exactly? The text above says it's "the fastest", but then it says "may be optimized for size". I don't know how to interpret this. Is it fast or is it small, or something else? Is it optimized for small size? Natural word size? Cacheline size? I prefer the phrasing of the caveats in the C and POSIX standards which just say it might not be fastest for all purposes. How about "Where there is no single type that is fastest for all purposes, the implementation may choose any type with the required signedness and at least the minimum width." I don't see anything in this man page saying that the <stdint.h> types are all typedefs, rather than new types that are distinct from the standard integer types. That seems like useful information.