From: Anton S. <an...@so...> - 2012-03-17 20:38:13
|
Hmm, if __flash acts in the same way as const, as in it's a qualifier. Then could you make it a super set of const? In other words __flash implies const? Then you could say: int __flash a; int __flash * b; int __flash * __flash c; This would be an int in flash, a pointer in ram to an int in flash, and a pointer in flash that points to an int in flash. And all of the constness would be guaranteed. If __flash does not behave as a qualifier then I'm not sure how you would achieve the third example above. Thanks, Anton p.s. Still lurking around on this list. :) I hope to get back to hacking on avr-llvm at some point. On Thu, Mar 15, 2012 at 1:01 PM, Borja Ferrer <bor...@gm...> wrote: > Ok I've finished working on all this. Native english speakers check out > these strings for a more formal way of saying the following: > > 1) Cannot write to flash memory. <-- emitted when trying to assign a value > to a flash var > 2) Flash variables are read only and should be declared with a const > qualifier. <-- emitted when doing something like __flash int, we want > __flash const int > 3) The pointee type of a flash pointer should be declared with a const > qualifier. <-- i cant think of a better way of saying it, this is emitted > when doing __flash int* ptr, we want __flash const int *ptr. > > Again, if anybody can think of any other sanity checks, list them here. > Once these strings are verified i'll commit my work. > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > avr-llvm-devel mailing list > avr...@li... > https://lists.sourceforge.net/lists/listinfo/avr-llvm-devel > |