[LLVMbugs] [Bug 24203] New: Programs with ill-formed declarations not declaring anything compiles

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 21 14:24:43 PDT 2015


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

            Bug ID: 24203
           Summary: Programs with ill-formed declarations not declaring
                    anything compiles
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: anders.granlund.0 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I have found the following c++ standard violations in clang, all related to
ill-formed edge cases of declarations:

* Test-case 1:

  int;
  int main() {}

This program is ill-formed by [dcl.dcl]/5 in the c++ standard (See
http://eel.is/c++draft/dcl.dcl#5 ). Clang compiles it without any error
messages. Since the program is ill-formed, I expect to get at least one error
message.

* Test-case 2:

  enum {};
  int main() {}

This program is ill-formed by [dcl.dcl]/5 in the c++ standard (See
http://eel.is/c++draft/dcl.dcl#5 ). Clang compiles it without any error
messages. Since the program is ill-formed, I expect to get at least one error
message.

* Test-case 3:

  typedef typedef int T;
  int main() {}

This program is ill-formed by [decl.spec]/2 in the c++ standard (See
http://eel.is/c++draft/dcl.dcl#dcl.spec-2 ). Clang compiles it without any
error messages. Since the program is ill-formed, I expect to get at least one
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/20150721/4fa2d35f/attachment.html>


More information about the llvm-bugs mailing list