[PATCH] Add support for scanf ("%ms", ...) etc. for -Wformat

Joseph S. Myers joseph@codesourcery.com
Mon Sep 17 15:40:00 GMT 2007


On Sun, 16 Sep 2007, Jakub Jelinek wrote:

> +      if ((fki->flags & (int) FMT_FLAG_SCANF_A_KLUDGE) && *format_chars == 'm')

I don't think this should be based on FMT_FLAG_SCANF_A_KLUDGE; I'd be 
inclined instead to define fki->alloc_char to be the allocation character 
accepted at this point in the format, if not 0.

> +  /* m assignment-allocation modifier, recognized in both C90
> +     and C99 modes, is a POSIX extension.  */

POSIX and ISO/IEC WDTR 24731-2.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list