[LLVMbugs] [Bug 11478] New: clang -std=c++0x should report use of (obsolete) typeof keyword
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Dec 4 22:46:29 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11478
Bug #: 11478
Summary: clang -std=c++0x should report use of (obsolete)
typeof keyword
Product: clang
Version: 2.9
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: Dave at Yost.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
clang -std=c++0x should report use of (obsolete) typeof keyword and suggest use
of decltype instead.
Instead clang gives inscrutable error messages.
0 280 Z% cat typeofbug.cpp
template<typename T>
class foo {
typedef typeof(T() - T()) differenceType;
};
0 281 Z% clang -std=c++0x -c typeofbug.cpp
typeofbug.cpp:3:22: error: expected ')'
typedef typeof(T() - T()) differenceType;
^
typeofbug.cpp:3:17: note: to match this '('
typedef typeof(T() - T()) differenceType;
^
typeofbug.cpp:3:11: error: C++ requires a type specifier for all declarations
typedef typeof(T() - T()) differenceType;
~~~~~~~ ^
typeofbug.cpp:3:28: error: expected ';' at end of declaration list
typedef typeof(T() - T()) differenceType;
^
;
3 errors generated.
1 282 Z%
--
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