[LLVMbugs] [Bug 15156] New: Unjustified vexing-parse
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Feb 4 23:54:56 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=15156
Bug ID: 15156
Summary: Unjustified vexing-parse
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: peter_ll at pgrz.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
clang version 3.3 (trunk 173433)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Hi
Compiling the following code results in a warning.
struct C
{
C(int) {};
};
struct D
{
D(C) {}
};
void a(int b)
{
D d( C(b) );
}
a.cpp:13:6: warning: parentheses were disambiguated as a function declaration
[-Wvexing-parse]
D d( C(b) );
^~~~~~~~
a.cpp:13:8: note: add a pair of parentheses to declare a variable
D d( C(b) );
^
( )
1 warning generated.
In my opinion there is no parse ambiguity because "b" names a concrete object.
I await the verdict of the language lawyers. ;)
Take care
Peter
--
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/20130205/63e945ac/attachment.html>
More information about the llvm-bugs
mailing list