[LLVMbugs] [Bug 9940] New: Strange error with function pointer variable and function template with same name
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue May 17 20:40:07 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9940
Summary: Strange error with function pointer variable and
function template with same name
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: sharparrow1 at yahoo.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Testcase:
template<typename T> int f();
int main() {
int((*f)())(f<int>); f();
}
clang gives:
<stdin>:5:15: error: use of undeclared identifier 'f'
int((*f)())(f<int>); f();
^
I'm not entirely sure whether this is valid, but claiming that f is undeclared
is confusing at best.
--
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