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

            Bug ID: 41851
           Summary: -Wstrict-prototypes doesn't seem to warn on
                    definitions
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

// $ clang -O2 -Wstrict-prototypes
// $ gcc -O2 -Wstrict-prototypes

int puts(const char*);

void f();
void g() { puts("foo"); }

void h() {
    f(1, 2);
};

void i() {
    g(1, 2);
};

void f(int a) { puts((const char*)(long)a); };

// clang warns on f
// gcc warns on f, g, h, i

// https://godbolt.org/z/IORbBb

-- 
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