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

            Bug ID: 43655
           Summary: missing error for arguments in func
           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]

clang-10 falls to emit the error for the following:

$ cat s.c
  static int fn1(int p);
  static int fn1()
  {
    return 0;
  }
  int main()
  {
    fn1(1);
    return 0;
  }

$ clang-10 -ferror-limit=0  s.c

clang version 10.0.0 (https://github.com/llvm/llvm-project.git
49c4e58b75ecec8dce75dd13c61aaeb30e14b531)
Target: x86_64-unknown-linux-gnu
Thread model: posix

When compiled with GCC, errors such as:

$ gcc-8.3  s.c
s.c: In function ‘fn1’:
s.c:3:1: error: number of arguments doesn’t match prototype
 {
 ^
s.c:1:12: error: prototype declaration
 static int fn1(int p);
                ^~~

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