Visual C++ 2012中的编译器错误?(搞砸了跳转地址)

Tob*_*bba 3 c++ compiler-construction visual-studio visual-c++

无需优化即可完全编译

void Add(T data)
{
    node<T> *pNode = new node<T>;
    pNode->m_pNext = NULL;
    pNode->m_data = data;

    uint32_t cPushes;
    uint32_t cPops;
    node<T> *pTail;

    while (true)
    {
        cPushes = m_cPushes;
        cPops = m_cPops;
        pTail = (node<T>*)m_pTail;
        if (cPushes != m_cPushes)
            continue;

        if (!pTail)
            if (CAS2(&m_pTail, NULL, cPushes, (uint32_t)pNode, cPushes +1))
                break;
        else if (CAS(&pTail->m_pNext, NULL, (uint32_t)pNode))
                break;
        else
            CAS2(&m_pTail, (uint32_t)pTail, cPushes, (uint32_t)pTail->m_pNext, cPushes + 1);
    }

    CAS2(&m_pHead, NULL, cPops, (uint32_t)pNode, cPops + 1);
    CAS2(&m_pTail, (uint32_t)pTail, cPushes, (uint32_t)pNode, cPushes + 1);
}
Run Code Online (Sandbox Code Playgroud)

反汇编:http://pastebin.com/7EaH3whu(pastebinned因为它很大,它以某种方式打破了SO的代码标签)

如果你看一下,关于每个跳转指令的地址都会混淆

例如,如果此语句失败:'if(!pTail)',而不是继续'else if',它会跳回到循环的开头(实际上,它跳转到跳转到跳转的开头)环)

完整代码:http://pastebin.com/U5qGgT0E

Dan*_*her 8

    if (!pTail)
        if (CAS2(&m_pTail, NULL, cPushes, (uint32_t)pNode, cPushes +1))
            break;
    else if (CAS(&pTail->m_pNext, NULL, (uint32_t)pNode))
            break;
    else
        CAS2(&m_pTail, (uint32_t)pTail, cPushes, (uint32_t)pTail->m_pNext, cPushes + 1);
Run Code Online (Sandbox Code Playgroud)

是真的

    if (!pTail) {
        if (CAS2(&m_pTail, NULL, cPushes, (uint32_t)pNode, cPushes +1)) {
            break;
        } else if (CAS(&pTail->m_pNext, NULL, (uint32_t)pNode)) {
            break;
        } else {
            CAS2(&m_pTail, (uint32_t)pTail, cPushes, (uint32_t)pTail->m_pNext, cPushes + 1);
        }
    }
Run Code Online (Sandbox Code Playgroud)

这是跳跃吗?我打赌.