http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52817

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-01 
12:37:00 UTC ---
(In reply to comment #0)
> void Wsafile::readdata(int NumFiles, va_list args) {
>      long * RWop;
>      printf("readdata 2 called \n");
>      RWop = va_arg(args,long *);
>      printf ("%x ( should be 0x12345678) %d (should be 1) \n",(unsigned
> int)RWop,NumFiles);  // should print 0x12345678

This line is probably the problem, unsigned int is too small to hold a pointer
value, so the value is not preserved.  

Stop using unsafe casts between incompatible types.

Reply via email to