Re: compilation warnings on DEC alpha platform

> Just a quick note to say that I see numerous warnings in both gnome and gtk
> code of the form
> warning: casts pointer to integer of different size
> and vice versa. This is due to void* and int being 8 and 4 bytes respectively
> on the DEC alpha (running linux at least). Execution, if these warnings are
> ignored, is fraught! Arithmetic traps galore and unaligned accesses galore!
> Oh yes!

all that's needed is to cast ints to long on alpha ... I have written some
macros to do that ... they might be usefull for these cases ... maybe put
in glib.h ???? ... or gnome.h ???

/*a few macros to reduce compiler warnings*/
#	define PTOI(p) (gint)((gpointer)p)
#	define ITOP(i) (gpointer)((gint)i)
#	define PTOI(p) (glong)((gpointer)p)
#	define ITOP(i) (gpointer)((glong)i)
/*I doubt there is a such a platform, but why not*/
#	define PTOI(p) (gshort)((gpointer)p)
#	define ITOP(i) (gpointer)((gshort)i)

then use these macros as casts


George Lebl <>
  The following implements RSA in perl and is illegal to export from the US:

          #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
          $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]