Compiling the source below with avr-gcc 4.0.2 gives an "invalid lvalue in
assignment":
------------------
#include <avr/io.h>
int main(void)
{
(unsigned char)DDRD |= (unsigned char)(1 << 7);
return 0;
}
------------------
The same code above builds fine for avr-gcc 3.4.3. The issue has to do with the
typecast of DDRD to unsigned char. If the typecast is removed then it compiles
without error for 4.0.2.
--
Summary: Regression: invalid lvalue in assignment
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eweddington at cso dot atmel dot com
GCC target triplet: avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25298