On Fri, 2007-07-13 at 23:47 -0700, Doug Baskins wrote:
> John:
> 
> Sorry, I miss-diagnosed the problem,
> the problem cast essentially is: 
> 
>        unsigned long * abc = (void *)(~0UL);
> 
> Which means storing a void pointer into a word pointer is illegal.

Implicit conversions FROM void* in C++ are ALL disallowed
(except to void const* of course).

The code is above is a hard error in C++. You must write:

       unsigned long * abc = (unsigned long*)(void *)(~0UL);

if you want it to work. This is different to C, C allows
implicit conversions FROM void*.

So this has nothing to do with void*<-->integer casts.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel

Reply via email to