5.14.3.11 The #pragma smart_io_format Directive
The #pragma smart_io_format
directive notifies the compiler that the listed
specifications are used by smart IO functions in the current module and that the IO
library code linked in must be able to process them. The pragma is functionally similar
to the -msmart-io-format
option (see Smart-io-format Option) but can be applied
in source code and in multiple modules.
smart_io_format
pragma has the general
form:#pragma smart_io_format "fmt"
where
"fmt"
is a string containing one or more
formatted, printf-style conversion specifications, following the same requirements as
the argument to the -msmart-io-format
option.Only one pragma is relevant per translation module. If more than one is present, the last takes precedence. The placeholders indicated by the pragmas are collated across all modules, however, and this accumulation indicates the features required by IO functions whose usage information cannot be determined from either the format strings or the arguments.
Usage of this pragma will supersede any usage of the -msmart-io-format
option, but only for the module in which it appears.