nemerle / dcc

This is a heavily updated version of the old DOS executable decompiler DCC
GNU General Public License v2.0
146 stars 27 forks source link

'and' operator in cpp code? #7

Open lab313ru opened 8 years ago

lab313ru commented 8 years ago

For example (icode.h):

bool matchWithRegDst(llIcode op)
{
    return (getOpcode()==op) and m_dst.isReg();
}

I cannot compile it. And there are many other operands too.

nemerle commented 8 years ago

Sorry, this is standard C++, but MSVC does not handle it properly. You'll have to disable the language extensions to get it to work ( Yes enabling extensions removes support for parts of the standard :frowning: )

I find that using or/not/and keywords helps me avoid bugs ( & vs &&) and makes the code more readable.

lab313ru commented 8 years ago

Could you make your code more different compilers compatible? I mean use only && instead of mixing && and and.

nemerle commented 8 years ago

I'm developing all my code under Linux with clang/gcc and currently have no access to a VisualStudio development environment. I'll be happy to accept a PR :smile: