gcc 4.6.1 messes up code ?? why

andy_code andy_code@mailup.net
Tue Aug 2 08:10:00 GMT 2011


FPGA_UART_DATA is a structure of word size (16bits) where the first char is a
bit field which gives me information about the status of the uart and its
buffer and the second char is the actual key press.

I have declared the pointer as volatile and I have declared each element of
the structure as volatile, it makes no difference. even register makes no
difference.


David Hagood wrote:
> 
>>
>>     FPGA_UART_DATA		*ptr;
>>     FPGA_UART_DATA		kpd;
> 
> What is the declaration of FPGA_UART_DATA? Could it be you are putting the
> "volatile" in the wrong place (e.g. making the POINTER volatile, rather
> than making the data POINTED TO volatile, or vis versa)?
> 
> 
> 
> 


-- 
View this message in context: http://old.nabble.com/gcc-4.6.1-messes-up-code----why-tp32169196p32175839.html
Sent from the gcc - Help mailing list archive at Nabble.com.



More information about the Gcc-help mailing list