Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    int main(void)
    {
        __asm {
          mov eax, 123
        }
    }

    // visual studio command line
    // cl testc.c
    // cl testcpp.cpp
    // testc.exe
    // echo C %errorlevel%
    // testcpp.exe
    // echo CPP %errorlevel%
Indeed. It's a C99 thing.

For those not familiar with MSVC. The C compiler is not C99 compliant and the C++ compiler is.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: