Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!local2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Tue, 21 Jul 2015 01:59:17 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: Spurious diagnostic messages References: <874mn5ty3y.fsf@kst-u.example.com> <87egm8qis7.fsf@kst-u.example.com> <87615e4pf3.fsf@gmail.com> <55AD590C.4050002@verizon.net> Date: Tue, 21 Jul 2015 07:59:17 +0100 Message-ID: <877fpukncq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:9+8hD0BsaR/Kgs41kvMc72VNH78= MIME-Version: 1.0 Content-Type: text/plain Lines: 19 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-2NFC1/e5XbLUmYB+xcTKf2iGp9B7DX71YNJ0m6mnWEJOrFpURCv/ZcsMHsdPhIRMXHbAdwylbUa/gOT!Rt0kdaDB9tYnTRryrjKLgwhhlQ2DxeDWgKovy3c1LF8qw9Fd3+yj7To/qO+KMcSuMdc7tg== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2431 Xref: csiph.com comp.lang.c:66086 James Kuyper writes: > That's my understanding of the suggestion - or at least, it's the only > way I can imagine that anything like this suggestion could actually be > implemented. It's not clear to me whether Gareth thought that issue > through. Ahhhh .... you may have a point there. I'd argue that the vast majority of printf() format specifiers _are_ known at compile time - string literals or one-of-may-string-literals -- and I'd be happy to have that extension for string literals only. Runtime-variable format specifiers are a relative corner case. > The format-string type checking he refers to only applies when the > format string is a string literal. Yes.