simh help?

From: Kevin Handy <kth_at_srv.net>
Date: Thu May 29 15:54:01 2003

Sean 'Captain Napalm' Conner wrote:

>It was thus said that the Great Brian Hechinger once stated:
>
>
>>IMHO that's *always* a good thing. it has really opened my eyes to the fact
>>that your average opensource coder has been so coddled by the whole gcc/x86
>>platform that they have really started to make stupid mistakes and even
>>stupider assumptions about things. the most common assumption is that a
>>void pointer and an int pointer is the same size. which just happens to be
>>true in 32-bit land, but totally hoses those of us who live in 64-bit land.
>>
>>
>
> A void * and an int, or an int *? Generally speaking, one can cast any
>
Usually a <mumble>* to an int, because on many systems an int and a
pointer are the same size (all the world's a vax). :-P A lot of older code
swaps pointers into/outof int's.

>type of pointer into a void *, and cast a void * back to any other type of
>pointer (without casts! At least in ANSI C; I think in C++ you need a
>cast). But if you mean casting a pointer (of any kind) into an int (or
>unsigned long, or whatever) then yes, I can see where that would definitely
>lead to problems.
>
> -spc (The only time my code failed on a 64-bit system, there was a bug
> in the Standard C library of that system that I triggered ... )
Received on Thu May 29 2003 - 15:54:01 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:16 BST