[LLVMbugs] [Bug 9635] New: C++0x bug in clang (possibly)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 6 03:36:19 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9635
Summary: C++0x bug in clang (possibly)
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chris at bubblescope.net
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
I'm not sure if the following is a bug in clang, or a change in the C++
standard for C++0x (although if it is a change, it's not one I've heard of).
The following code fails to compile in clang c++03 and g++. g++ 4.5 continues
to reject the code in c++0x mode, but clang accepts it with -std=c++0x.
Some libraries rely on code like this NOT compiling, to check templates are
only instantiated in certain ways.
template<int N>
struct foo
{ friend int f(int) { return 0; } };
int main(void)
{
foo<1> f;
foo<2> g;
}
--
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