[LLVMbugs] [Bug 22701] bogus "format string is not a string literal" warnings

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 25 18:40:10 PST 2015


Andrew Pinski <pinskia at gcc.gnu.org> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
                 CC|                            |pinskia at gcc.gnu.org
         Resolution|INVALID                     |---

--- Comment #8 from Andrew Pinski <pinskia at gcc.gnu.org> ---
(In reply to comment #7)
> This is *precisely* the problem that -Wformat-nonliteral is supposed to
> detect -- your format string is not a string literal -- so, no, this is the
> right flag. GCC's warning is broken and fails to fire in this case; that's
> their bug, not ours.

Where is -Wformat-nonliteral documented?  Because GCC documents it as:
If -Wformat is specified, also warn if the format string is not a string
literal and so cannot be checked, unless the format function takes its format
arguments as a va_list. 

Notice the last part of the sentence; this conflicts with the way clang
implements this warning.  I can't seem to find clang's documentation for half
of the options that clang implemented in the user guide.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150226/9ae911f4/attachment.html>

More information about the llvm-bugs mailing list