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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

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
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to