17 august 2012 06:48
I noticed that the predefined _WIN64 macro is not recognized under VS 2010 IDE. So the syntax highlighting and the symbol browser do not properly display symbols based on this macro definition.
typedef __int64 MY_INT;
typedef int MY_INT;
always highlights or points to the int definition (the compiler of course takes __int64 definition).
I guess the problem is caused by a fact that his macro is compiler internal and it is not explicitly defined somewhere. However some other compiler internal macros (as _WIN32 or _MSC_VER) are recognized correctly by IDE.
I tested also VS 2012 and here the problem does not occur, _WIN64 macro is recognized by IDE in the same project.
Is there a way how I can setup also VS 2010 IDE so it will recognize the _WIN64 macro in x64 projects?
18 august 2012 11:31If you really want int then you can use INT_PTR. If you want to define by yourself, check the definition of INT_PTR.
Thanks, Renjith V R
19 august 2012 10:36Sorry, but probably you did not understand the topic. The problem is not with compiler, the problem is with IDE (symbol borwser, syntax highlighting), which does not reflect properly what is defined if the definitions rely on the _WIN64 macro.