Ben Wing <ben(a)xemacs.org> wrote:
* free-hook.c (check_free):
Fix aliasing warning.
Index: src/free-hook.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/free-hook.c,v
retrieving revision 1.11
diff -u -p -r1.11 free-hook.c
--- src/free-hook.c 2004/09/20 19:19:45 1.11
+++ src/free-hook.c 2004/11/18 02:18:19
@@ -131,7 +131,8 @@ check_free (void *ptr)
#endif
EMACS_INT present = (EMACS_INT) gethash (ptr, pointer_table,
- (const void **) &size);
+ (const void **)
+ (void *) &size);
if (!present)
{
Please do not commit this patch just yet. I am not surprised that it
stops gcc from issuing a warning, but I do not believe this is correct,
as in, "guarantees that compilers that do alias analysis will generate
correct code." On the other hand, I am not a language lawyer. Give me
a couple of days to try to get one to comment.
Thanks,
--
Jerry James
http://www.ittc.ku.edu/~james/