[llvm-bugs] [Bug 43655] New: missing error for arguments in func

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 12 04:40:03 PDT 2019


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: unassignedclangbugs at nondot.org
          Reporter: tangyixuan at mail.dlut.edu.cn
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191012/454a8ab4/attachment.html>


More information about the llvm-bugs mailing list