[LLVMbugs] [Bug 8345] New: Failure to compile templated atomic

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 8 18:40:51 PDT 2010


           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: unassignedclangbugs at nondot.org
        ReportedBy: dustin at spy.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

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

More information about the llvm-bugs mailing list