[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] "sized pointer" increment
From: |
Tristan Gingold |
Subject: |
Re: [avr-gcc-list] "sized pointer" increment |
Date: |
Thu, 22 May 2008 16:39:03 +0200 |
On May 22, 2008, at 4:26 PM, Dusan Ferbas wrote:
Hi guys,
"pointer size" increments, in a snippet below, work with
WinAVR-20060421 (avr-gcc 3.4.6), but does not in WinAVR-20071221
(avr-gcc 4.2.2).
Compiler claims casted pointer as not an lvalue.
Is this correct behaviour ?
Yes, post/pre increment applies only to lvalue. And a cast is not
anymore an lvalue.
This was an gcc extension that has been deprecated IIRC.
Tristan.
unsigned char *p_received_data;
boot_info_header->section_length = *((unsigned long*)
p_received_data)++;
boot_info_header->address = *((unsigned short*)
p_received_data)++;
Dusan
_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list