The attributes are documented in the gcc documentation:
 
There is no "used" attribute for variables - the nearest is in fact "unused", which is close to what you think you want.  However, attributes are not the answer here - even if the "used" attribute existed for variables.  You cannot possibly get the effect you are looking for, because there is no way for the compiler to guarentee the ordering of data within a section.  The way to deal with this is to use a struct containing all your eeprom data.
 
mvh.,

David
 
 
----- Original Message -----
Sent: Thursday, June 15, 2006 9:50 PM
Subject: [avr-chat] Re: AVR-chat Digest, Vol 17, Issue 12


For the optimization issue, you could try __attribute__((used)) . This way you
tell the compiler to assume that the variable is used even if it actually
isn't.


I thought there would be something like that around.  Where are all the possible "__attribute__"'s listed in the docs, by chance, I'm becoming interested...

Steve


_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat
_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat

Reply via email to