This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Re: GPOINTER_TO_INT on 64-bit arch: cast from pointer to integer of different size
- From: Behdad Esfahbod <behdad at cs dot toronto dot edu>
- To: Wu Zhou <woodzltc at cn dot ibm dot com>
- Cc: frysk at sources dot redhat dot com
- Date: Tue, 18 Apr 2006 10:38:41 -0400 (EDT)
- Subject: Re: GPOINTER_TO_INT on 64-bit arch: cast from pointer to integer of different size
- References: <Pine.LNX.4.64.0604181343510.6546@woodzltc>
On Tue, 18 Apr 2006, Wu Zhou wrote:
> I met another error when I try to build the latest cvs source on my ppc64
> box. This is general to GPOINTER_TO_INT on 64-bit arch, I guess.
>
> Here is the output message in the building process:
>
> /usr/bin/gcc -m64 -DPACKAGE_NAME=\"frysk\" -DPACKAGE_TARNAME=\"frysk\" -DPACKAGE_VERSION=\"0.0.1.2006.04.17\" -DPACKAGE_STRING=\"frysk\ 0.0.1.2006.04.17\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"frysk\" -DVERSION=\"0.0.1.2006.04.17\" -I. -I../../../frysk/frysk-gtk/tlwidgets -fPIC -DPIC -std=gnu99 -Wall -Werror -I../../../frysk/frysk-gtk/tlwidgets/src/widgets -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libgtk-java -I/usr/include/glib-java -g -O -MT src/widgets/ftkstripchartx.o -MD -MP -MF "$depbase.Tpo" -c -o src/widgets/ftkstripchartx.o ../../../frysk/frysk-gtk/tlwidgets/src/widgets/ftkstripchartx.c; \
> then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
> cc1: warnings being treated as errors
> ../../../frysk/frysk-gtk/tlwidgets/src/widgets/ftkstripchartx.c: In function âftk_stripchart_button_clickedâ:
> ../../../frysk/frysk-gtk/tlwidgets/src/widgets/ftkstripchartx.c:1149: warning: cast from pointer to integer of different size
> ../../../frysk/frysk-gtk/tlwidgets/src/widgets/ftkstripchartx.c: In function âftk_spinbutton_vcâ:
> ../../../frysk/frysk-gtk/tlwidgets/src/widgets/ftkstripchartx.c:1224: warning: cast from pointer to integer of different size
> make[2]: *** [src/widgets/ftkstripchartx.o] Error 1
>
> In line 1149 and 1224, there is a macro GPOINTER_TO_INT, trying to convert
> a type of gpointer (a pointer to void) to gint, on 64-bit arch, gpointer
> is 64-bit, so there is a warning poped out to complain this.
>
> Maybe we need to report this problem to the upstream? A temporary
> work-around is to disable the "-Werror" option.
>
> Any comments?
Yes, please report upstream at bugzilla.gnome.or. We need a test
case and an exact machine and compiler description to fix this.
Also, -Werror is bad, but well...
> Thanx
> - Wu Zhou
--behdad
http://behdad.org/
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"