[LLVMbugs] [Bug 10428] New: placement new with vexing parse parsed as ill-formed non-placement new
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jul 20 09:47:09 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10428
Summary: placement new with vexing parse parsed as ill-formed
non-placement new
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: richard-llvm at metafoo.co.uk
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
clang rejects this:
using size_t = decltype(sizeof(int));
struct S {};
void *operator new(size_t, S);
void f() { new (S()) int; }
foo.cpp:4:17: error: cannot allocate function type 'S ()' with new
void f() { new (S()) int; }
^~~
The standard does not appear to provide any guidance in disambiguating this
case, but g++-4.4.5 accepts it, and it seems reasonable for us to do the same.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list