Warning in makedoc.c

Corinna Vinschen vinschen@redhat.com
Wed Oct 29 10:49:00 GMT 2014


On Oct 28 17:25, Joel Sherrill wrote:
> Hi
> 
> On a 64-bit Fedora 20 machine, I see this building newlib:
> 
> ../../../../gcc/newlib/doc/makedoc.c: In function ‘push_number’:
> ../../../../gcc/newlib/doc/makedoc.c:273:12: warning: cast from pointer
> to integer of different size [-Wpointer-to-int-cast]
> *isp = (int)(*pc);
> ^
> ../../../../gcc/newlib/doc/makedoc.c: In function ‘bang’:
> ../../../../gcc/newlib/doc/makedoc.c:1341:2: warning: cast to pointer
> from integer of different size [-Wint-to-pointer-cast]
> *(int *)((isp[0])) = isp[-1];
> ^
> ../../../../gcc/newlib/doc/makedoc.c: In function ‘atsign’:
> ../../../../gcc/newlib/doc/makedoc.c:1349:15: warning: cast to pointer
> from integer of different size [-Wint-to-pointer-cast]
> isp[0] = *(int *)(isp[0]);
> 
> Can makedoc.c use int32_t?

How does that help on 64 bit systems?  I don't claim to understand
what makedoc is doing there, but shouldn't pointers be casted to
intptr_t or uintptr_t ideally?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20141029/868a02ec/attachment.sig>


More information about the Newlib mailing list