https://llvm.org/bugs/show_bug.cgi?id=24265
Bug ID: 24265 Summary: Mixing init-declarator for variables and functions in declaration with auto type-specifier Product: clang Version: trunk Hardware: All OS: All Status: NEW Severity: normal Priority: P Component: C++14 Assignee: unassignedclangb...@nondot.org Reporter: anders.granlun...@gmail.com CC: llvmbugs@cs.uiuc.edu Classification: Unclassified Consider the following program (prog.cc): auto i = 0, f(); int main() {} Compile it with the following command line: clang++ prog.cc -std=c++14 -pedantic-errors No error messages are given. I expect to get at least one error message since the program is ill-formed. The program is ill-formed by [decl.spec.auto]/8: http://eel.is/c++draft/dcl.dcl#dcl.spec.auto-8 "If the init-declarator-list contains more than one init-declarator, they shall all form declarations of variables." I have tried this with clang HEAD 3.8.0 (trunk 243216) here: http://melpon.org/wandbox/permlink/9wMaOZMUED4X0xL8 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list LLVMbugs@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs