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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to