[llvm-bugs] [Bug 40087] New: Clang rejects well-formed C11 program using [*]

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 18 09:29:38 PST 2018


            Bug ID: 40087
           Summary: Clang rejects well-formed C11 program using [*]
           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

Conside the following program (prog.c):

  void f(int a[sizeof(int [*])]);

  int main()

Compile it with the following command line:

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

It incorrectly gives the following error:

  error: star modifier used outside of function prototype

Compiling the program should give no error since it is well-formed according to

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/9d8eab05/attachment.html>

More information about the llvm-bugs mailing list