[llvm-bugs] [Bug 40185] New: c11: Warning instead of error for missing type specifier.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Dec 30 06:22:38 PST 2018


            Bug ID: 40185
           Summary: c11: Warning instead of error for missing type
           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()
    typedef t;

Compilation command line:

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

Observed behaviour:

  The following warnings were outputed:

    prog.c:3:13: warning: type specifier missing, defaults to 'int'
        typedef t;
        ~~~~~~~ ^
    prog.c:3:13: warning: unused typedef 't' [-Wunused-local-typedef]
    2 warnings generated.

Expected behaviour:

  The first warning should be an error instead since  -pedantic-errors  was


  GCC gives the expected error.

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/20181230/cf601f1e/attachment.html>

More information about the llvm-bugs mailing list