BUG: %lc in printf fails

Joseph S. Myers jsm28@cam.ac.uk
Sat Sep 23 10:25:00 GMT 2000


On Sat, 23 Sep 2000, Markus Kuhn wrote:

> In addition, gcc 2.95.2 complains erroneously
> 
>   wcwtest.c:9: warning: long int format, int arg (arg 2)
> 
> even though %lc should expect a wint_t argument.

For properly working format checking you'll need CVS GCC, which supports
(given appropriate -std options if you want the right -pedantic messages
and scanf %a handling):

* C89
* AMD1
* C99 (subject to my patch adding %j support which is awaiting review)
* The X/Open extensions from the current Austin Group draft (subject to my
Aardvark reports for the details of what is warned / not warned about to
be exactly right)
* Glibc 2.2 extensions (except that I haven't yet added a couple of scanf
extension flags to GCC, and in C99 mode GCC will strictly follow C99 for
%a formats rather than what glibc does (see CONFORMANCE))

except that it does not yet support checking wide character (wprintf
etc.) format functions.

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Libc-alpha mailing list