On Fri, Feb 19, 2010 at 11:25 AM, Jim Michaels <[email protected]> wrote: > after much difficulty trying to get subscribed to the list, here is my > question. > > #define CAST(x) reinterpret_cast<DWORD>( x ) > or > #define CAST(x) (DWORD)( x ) > ... > // All msdos data structures must be packed on a 1 byte boundary > #pragma pack (1) > struct { > DWORD StartingSector ; > WORD NumberOfSectors ; > DWORD pBuffer; > } ControlBlock; > #pragma pack () > ... > ControlBlock.pBuffer = CAST(buffer) ; > > "dgeomlib.cpp:178: error: cast from 'unsigned char*' to 'DWORD' loses > precision" > > this only occurs on 64-bit target compiler. > how can I circumvent?
Use DWORD_PTR instead. > or, how can I use ifdefs to disable this windows 9x code only for x64 target > (obviously the x64-output compiler must have some sort of #define?)? > #ifdef _WIN64 ... #endif should do? > > Jim Michaels > [email protected](main) > JesusnJim.com (my site) -- Ozkan ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
