On Fri, Mar 04, 2005 at 07:27:59PM +0100, Brian Foster wrote:
> tip: unless you are doing something sneaky elsewhere,
> it is a good idea to use __format__ and __printf__,
> i.e.: __attribute__((__format__(__printf__, 2, 6)))
> because those names are less likely to be #define'd
> by some idio^H^H^H^H^Hone else.
yes, good point. and gcc supports that.
> |[ ... ]
> | i've read through the gcc docs and as far as i can see, i'd need to
> | change gcc in order to support new % format codes. am i missing
> | something?
> I've always assumed --- but without research! --- that
> the % codes are hardwired into gcc. in addition to
> the answer to Kevin's question, I would be interested
> in knowing:
they're defined in c-format.c in the gcc sources it appears.
> - is it possible, without changing gcc, to remove
> or redefine some of the % codes it does know?
i think it should be. and i think the argument for it is that the
format escapes are actually handled by the target libc. gcc seems to
know glibc and various versions of ansi/iso c. but gcc targets platforms
with other libc's - the mingw gcc uses the ms libc.
> it's never been too important, but if someone just
> happens to know .... thanks.
yes, but it's a great way to catch some silly errors.
kevin lyda ~ dems for torture: salazar(co/10) landrieu(la/08) pryor(ar/08)
kevin at ie.suberic.net ~ nelson(fl/06) nelson(ne/06) lieberman(ct/06) 2/2/04
Those who refuse to raise their voices against something as clearly evil
as torture are enablers, if not collaborators. --Bob Herbert, 2/11/04
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!