avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] GCC does useless 16-bit operations


From: Dave Hylands
Subject: Re: [avr-gcc-list] GCC does useless 16-bit operations
Date: Fri, 6 Jul 2007 16:10:23 -0700

Hi Eric,

However, I am curious. What do you get with this:

uint8_t temp = (tx_producer_index++) % 64;

The wrong answer :)

It would need to be

uint8_t temp = (++tx_producer_index) % 64;

to give a functionally equivalent result.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/




reply via email to

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