www.digitalmars.com         C & C++   DMDScript  

c++ - Even more -wc stuff ...

reply "Matthew Wilson" <matthew stlsoft.org> writes:
Now I'm having a nasty with the Win32 LOWORD & LOBYTE stuff.

I've a suite of functions for detecting OS, e.g.

inline Bool IsWin2K(void)
    { DWORD dw = ::GetVersion(); return (!(dw & 0x80000000) &&
LOBYTE(LOWORD(dw)) == 5) && HIBYTE(LOWORD(dw)) == 0; }

Alas, using -wc gives me a heap of errors. I'd rather not have to change all
this logic, but want to use -wc.

Any ideas?
Jun 11 2003
parent reply "Walter" <walter digitalmars.com> writes:
Why not just use -wc for an optional run, to see if there's anything you
want to modify?

"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bc7h9f$2agu$1 digitaldaemon.com...
 Now I'm having a nasty with the Win32 LOWORD & LOBYTE stuff.

 I've a suite of functions for detecting OS, e.g.

 inline Bool IsWin2K(void)
     { DWORD dw = ::GetVersion(); return (!(dw & 0x80000000) &&
 LOBYTE(LOWORD(dw)) == 5) && HIBYTE(LOWORD(dw)) == 0; }

 Alas, using -wc gives me a heap of errors. I'd rather not have to change
all
 this logic, but want to use -wc.

 Any ideas?
Jun 11 2003
parent "Matthew Wilson" <matthew stlsoft.org> writes:
Well the prosaic reason is that I'm then forced to mess around with ordering
in my makefiles, until I've shuffled the afflicted files to the end of the
build sequence.

The poetic reason is that I'd like to use -wc all the time with DMC++
compilation.

However, this particular scenario is in no way the fault of the compiler, so
I understand perfectly why there may be no help forthcoming. I guess we none
of us want to see specific exceptions to the way the compiler does its
translation - i.e. recognising M$ HIBYTE() etc. macros, in the way the
Visual C++ "magically" avoids giving the C4239 warning for the auto_ptr
template in <memory> but gives it for any other similarly constructed
template (even of the same name) in a different file.

I'll apply some STLSoft style magic, methinks. :)

"Walter" <walter digitalmars.com> wrote in message
news:bc7v9m$2ofs$2 digitaldaemon.com...
 Why not just use -wc for an optional run, to see if there's anything you
 want to modify?

 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bc7h9f$2agu$1 digitaldaemon.com...
 Now I'm having a nasty with the Win32 LOWORD & LOBYTE stuff.

 I've a suite of functions for detecting OS, e.g.

 inline Bool IsWin2K(void)
     { DWORD dw = ::GetVersion(); return (!(dw & 0x80000000) &&
 LOBYTE(LOWORD(dw)) == 5) && HIBYTE(LOWORD(dw)) == 0; }

 Alas, using -wc gives me a heap of errors. I'd rather not have to change
all
 this logic, but want to use -wc.

 Any ideas?
Jun 11 2003