[llvm-bugs] [Bug 40088] New: Accepts ill-formed C11 program with redundant extern in declaration that does not declare anything.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 18 11:09:51 PST 2018


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

            Bug ID: 40088
           Summary: Accepts ill-formed C11 program with redundant extern
                    in declaration that does not declare anything.
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: anders.granlund.0 at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Test case (prog.c)

  int main()
  {
    struct S;
    extern struct S;        
  }

Compilation command:

  clang prog.c -std=c11 -pedantic-errors 

Expected output:

  An error message since we are using  -pedantic-errors  and the second
  declaration does not declare anything.

Actual output:

  No error message.

Note:

  gcc correctly reject this program with an error message.

-- 
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/20181218/a55bcfdc/attachment.html>


More information about the llvm-bugs mailing list