Avoiding "assignment from incompatible pointer type" warning

Florian Weimer fw@deneb.enyo.de
Sun Oct 13 15:09:00 GMT 2002


"Joshua Nye" <josh@boxcarmedia.com> writes:

> What you're looking for is a cast. i.e.:
>
> int *p;
> float g = 3.141592653589793238;
> p = (int *)&g;

Is this code legal?  I doubt it.



More information about the Gcc-help mailing list