Common malloc/free practice violates ANSI standard ?

T. William Wells bill at twwells.com
Thu Oct 19 20:13:06 AEST 1989


: * assigning a void* to an OBJ* involves rounding up to an even address

: * assigning an OBJ* to a void* involves no change of address

The standard requires that casting from (void*) to (OBJ*) and back
give pointers that compare equal and point to the same object.
Free will have no problems with it.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com



More information about the Comp.std.c mailing list