| Date: Fri, 4 Mar 2005 21:51:11 +0000
| From: kevin lyda <kevin+dated+1110405085.510c82 at ie.suberic.net>
|
| On Fri, Mar 04, 2005 at 07:27:59PM +0100, Brian Foster wrote:
| > - 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.
I concur, and in fact, that reasoning (albeit with
different examples) _is_ why I asked, especially
about the removing and/or redefining --- some of
so-called `libc's I am(!) working with do not have
some of the % codes or, in one case, a broken one
(which I therefore want to avoid using).
| > 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.
yep. I first ran into this sort of checking with
the similar `lint' directive /*PRINTFLIKEn*/ where
<n> was the argument with the format string (the
args to print were, AFAICR, assumed to be n+1 ...).
I've been using this type of checking ever since
(when possible)...
cheers!
-blf-
--
Experienced (20+ yrs) kernel/software Eng: | Brian Foster Montpellier,
• Unix, embedded, &tc; • Linux; • doc; | blf at utvinternet.ie FRANCE
• IDL, automated testing, process, &tc. | Stop E$$o (ExxonMobile)!
Résumé (CV) http://www.blf.utvinternet.ie | http://www.stopesso.com
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!