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: unassignedclangb...@nondot.org
          Reporter: bba...@google.com
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to