[LLVMbugs] [Bug 24265] New: Mixing init-declarator for variables and functions in declaration with auto type-specifier
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jul 26 06:51:10 PDT 2015
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: unassignedclangbugs at nondot.org
Reporter: anders.granlund.0 at gmail.com
CC: llvmbugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150726/7587d69d/attachment.html>
More information about the llvm-bugs
mailing list