is _MSC_VER broken??

J

jm

Hello,

It appears the compiler #define _MSC_VER is broken under .NET, even though
when "mousing over" the _MSC_VER it says it's #def'd as 1300. That's exactly
what I'd expect. However, when I compile code that uses it -

#if _MSC_VER == 1200
// some code here
#elif _MSC_VER == 1300
// somemore code
#endif

OR

// let's make an intentional error.....
#if _MSC_VER == 1300
badbad = 5
#endif

..NET won't see the code for either of the examples. Is this a known bug? And
is there a reasonable work-around?

Thanks!

jm
 
T

tom_usenet

Hello,

It appears the compiler #define _MSC_VER is broken under .NET, even though
when "mousing over" the _MSC_VER it says it's #def'd as 1300. That's exactly
what I'd expect. However, when I compile code that uses it -

#if _MSC_VER == 1200
// some code here
#elif _MSC_VER == 1300
// somemore code
#endif

OR

// let's make an intentional error.....
#if _MSC_VER == 1300
badbad = 5
#endif

.NET won't see the code for either of the examples. Is this a known bug? And
is there a reasonable work-around?

_MSC_VER is 1310 in VC.NET 2003, 1300 in VC.NET 2002. The mouse hover
seems to have a bug - I just tried it on 2003, and I saw "1300" too.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top