|
From: John M. <ato...@gm...> - 2012-03-19 02:53:59
|
> 1) Cannot write to flash memory. <-- emitted when trying to assign a value
> to a flash var
>
The error for a const being assigned a value is "error: read-only variable
is not assignable" so I would make the wording consistent and just do...
"error: Flash variable is not assignable" ...or...
"error: __flash qualified variable is not assignable"
> 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
>
Something like the below and then also have one of those clang fix-it hints
showing const being added.
"error: Flash variable requires const qualifier"
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.
>
I think this can be the same as or similar to #2 and again use the fix-it
hint to show explicitly where the const needs to be placed.
|