This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoiding "assignment from incompatible pointer type" warning


> > 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?




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]