http://llvm.org/bugs/show_bug.cgi?id=8345

           Summary: Failure to compile templated atomic
           Product: clang
           Version: 2.8
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


I've got a class that wraps __sync_* functions and provides atomics of various
types.  This fails to compile with clang if I use it with more than one type.


templated-atomic.cc:10:37: error: cannot initialize a parameter of type
      'long long volatile *' with an rvalue of type 'int volatile *'
        return __sync_add_and_fetch(&value, 1);
                                    ^~~~~~
templated-atomic.cc:21:5: note: in instantiation of member function
      'Atomic<int>::operator++' requested here
    ++ai;
    ^
1 error generated.

-- 
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