[llvm-bugs] [Bug 43051] New: Using single invalid format specifier for printf/scanf should trigger -Wformat-extra-args warning.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 19 11:50:38 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43051

            Bug ID: 43051
           Summary: Using single invalid format specifier for printf/scanf
                    should trigger -Wformat-extra-args warning.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: yuanfang.chen at sony.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Currently, only using two or more invalid format specifiers triggers the
warning. This is not consistent.

clang
https://gcc.godbolt.org/z/B0faBq
https://gcc.godbolt.org/z/BRicqP

msvc
https://gcc.godbolt.org/z/Sjv3zY
https://gcc.godbolt.org/z/l_IxSC

gcc
https://gcc.godbolt.org/z/eFguIe
https://gcc.godbolt.org/z/ycs8Pb


scanf gcc
https://gcc.godbolt.org/z/2fPYHi
https://gcc.godbolt.org/z/m_pNrY

-- 
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/20190819/35a26de9/attachment.html>


More information about the llvm-bugs mailing list