[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] bug !

From: Allan G. Schrum/Theresa C. Schrum
Subject: Re: [avr-gcc-list] bug !
Date: Sun, 12 Aug 2001 13:23:28 -0400

Hi Kang,

The m1 and m2 variables are local to the procedure. They
each point to a "void" object. So your statement does
absolutely nothing other than assign the location of one
void object (in local variable m2) to the local variable m1.
Since it is never used, the optimizer says this is not too
interesting and all you get is a "ret". Nothing outside of
the procedure is affected by the statement.

If you had done:

*m1 = *m2 ;

then something different would occur.



Kang Tin LAI wrote:

> void fxn(void *m1, void *m2)
> {
>         m1 = m2;
> }
> -O1 -O2 -O3 or -Os except -O0
> The only generated code is: ret
> Any idea?
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]