Compilation error

Ricard Wanderlof ricard.wanderlof at axis.com
Sun Sep 9 14:10:24 PDT 2007


On Sun, 9 Sep 2007, Greg Haerr wrote:

> :   ((type)x)++
> :
> I've always thought the above was a useful construct, if dangerous.
> How can the same result be achieved without the extra step of
> copying to a temp variable of the desired type?  Will gcc 4.x
> optimize this out if the temp variable is auto?

In general, I would assume that a compiler would be able to optimize any 
variable away given the right circumstances, this one included.

/Ricard
--
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30


More information about the uClibc mailing list