Avoiding "assignment from incompatible pointer type" warning

Joshua Nye josh@boxcarmedia.com
Tue Oct 15 11:24:00 GMT 2002


> > int *p;
> > float g = 3.141592653589793238;
> > p = (int *)&g;
> 
> Is this code legal?  I doubt it.
> 

What do you consider legal and why wouldn't it be?





More information about the Gcc-help mailing list