On Jan 21, 2011, at 8:27 AM, Tom Browder wrote:

> cc1: warnings being treated as errors
> sh_billboard.c:125:12: error: pointer of type 'void *' used in subtraction
> /bin/bash ../../libtool --tag=CC   --mode=compile gcc-4.5.1
> -DHAVE_CONFIG_H -I. -I../../include  -pedantic -W -Wall -Wundef
> -Wfloat-equal -Wshadow -Winline -Wno-long-long  -Werror
> -I../../src/other/tcl/generic -I../../src/other/tcl/unix
> -I/usr/local/include -DBRLCADBUILD=1 -I../../include
> -I../../src/other/openNURBS   -pipe -fno-strict-aliasing -fno-common
> -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -pedantic -W -Wall -Wundef
> -Wfloat-equal -Wshadow -Winline -Wno-long-long -c -o sh_cloud.lo
> sh_cloud.c
> 
> I remember having to fighting that mess years ago porting to gcc but
> have since lost the bubble.  But Sean can fix it I know.

It should be fixed as of r42535 from yesterday.  The problem is isolated to the 
bu_byteoffset() macro in bu.h that attempts to characterize a pointer as an 
integer memory offset.  For most modern platforms, this is merely the pointer 
value itself.  For some platforms, however, it's not and you have to subtract 
the pointer value from the first possible pointer value.  That accounts for 
pointer addressing that doesn't start from "zero".

Anyways, strict building has forced the issue getting addressed.  I merely 
merged what we do for the Intel compiler since it's c99 compliance caught the 
void* trick years ago.

Cheers!
Sean


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to