This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Proto-patch for "%I64" on Microsoft
joseph@codesourcery.com (Joseph S. Myers) wrote on 26.11.04 in <Pine.LNX.4.61.0411262214310.1382@digraph.polyomino.org.uk>:
> but not for signedness of bit-fields, for example. I suspect we want two
> different options (whether command-line options, or printf / system_printf
> format attributes), to warn for formats according to some standard set or
> according to what the system supports - but I don't care for such changes
> in this area at this development stage.
Three, at least: standard (whichever is selected), system libc, and user-
defined implementation. (The latter would, for example, handle gcc error
formats and Linux kernel format extensions.)
Though I'm afraid even that might not be enough, considering that it is
highly desirable to implement format checking for, say, NSString
stringWithFormat - which, apart from needing to look at @".." constants
instead of normal or wide strings, has a different format specifier set
again (includes %@, for example, and does not necessarily implement the
same set as printf for normal specs, either).
Long-time, I suspect one would like to be able to define named format
specifier sets, and define in some yet-to-determined manner what specs
that named set actually supports, and then attach named sets to formatting
functions much like is done today. Just predefine sets for standard and
system libc.
MfG Kai