[llvm-bugs] [Bug 41183] New: Implicit function declarations also trigger -Wstrict-prototypes

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 21 08:55:17 PDT 2019


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

            Bug ID: 41183
           Summary: Implicit function declarations also trigger
                    -Wstrict-prototypes
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bbaren at google.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Compiling

    int main() { return f(); }

with -Weverything triggers both -Wimplicit-function-declaration and
-Wstrict-prototypes:

    example.c:1:21: warning: implicit declaration of function 'f' is invalid in
C99 [-Wimplicit-function-declaration]
    int main() { return f(); }
                        ^
    example.c:1:21: warning: this function declaration is not a prototype
[-Wstrict-prototypes]
    2 warnings generated.

This seems redundant – implicit function declarations will never be prototypes.

-- 
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/20190321/b05dd587/attachment-0001.html>


More information about the llvm-bugs mailing list