[LLVMbugs] [Bug 10735] New: clang uses the regparm attribute when deciding templace specializations
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Aug 24 13:39:50 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10735
Summary: clang uses the regparm attribute when deciding
templace specializations
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: rafael.espindola at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Clang rejects and gcc accepts the following code:
template <typename Method> struct nsRunnableMethodTraits {
};
//template <class C> struct nsRunnableMethodTraits<void __attribute__ ((regparm
(0))) (C::*)()> {
template <class C> struct nsRunnableMethodTraits<void (C::*)()> {
typedef int base_type;
};
template<typename Method> typename nsRunnableMethodTraits<Method>::base_type*
NS_NewRunnableMethod(Method method) ;
struct C1 {
virtual void __attribute__ ((regparm (0))) FinishStream(void) {
NS_NewRunnableMethod( &C1::FinishStream);
}
};
Changing which line make clang accept the code.
--
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