Hi all, Attached is a first stab at adding a warning for using non-standard things in format strings (like the 'q' length modifier or the 'S' conversion specifier).
I'm a little bit confused about the status of some of these. For example, should 'C' and 'S' be considered GNU extensions, and therefore allowable when using -std=gnu99? Also, there might be a better approach to this, or better names for things, etc. so please take a look. This causes a bunch of new failures in the gcc.dg test-suite. For instance, in gcc.dg/format/c90-scanf-3.c it will warn about the 'a' length modifier. The test says "Formats using extensions to the standard should be rejected in strict pedantic mode." so I think my patch is doing the right thing, but maybe the expectations need to be tweaked a bit. Thanks, Hans
non-standard-format-strings.diff
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
