-Wformat warnings

Martin Buchholz martin@xemacs.org
Thu Jan 27 19:47:00 GMT 2000


The -Wformat warnings are nice, but how does one turn them off when
the format string arg is non-constant?  In my opinion, the following
warning should never appear - it's a useless meta-warning.  There
doesn't seem to be an obvious way to suppress them.

/xemacs/ws/dev/src/lread.c:312: warning: format not a string literal, argument types not checked

It would be nice if warnings could be properly done for this:

          fprintf (stderr,
                   (c >= 0x20 && c <= 0x7E) ? "UU%c" :
                   ((c == '\n') ? "UU\\n\n" : "UU\\%o"), c);


More information about the Gcc-bugs mailing list