On 10/01/2012 09:08, Joerg Wunsch wrote:
As Jan Waclawek wrote:

Just want to remark that these issues had been discussed already in
the thread stemming from
http://lists.nongnu.org/archive/html/avr-libc-dev/2011-09/msg00025.html
...

And the outcome was that the macro solution is not really suitable
as a replacement.  To quote Johann:

prog_char as a macro is dreaded.

const prog_char * const p = NULL;

puts p in progmem so it's broken by design. With that users will be
taken for a ride.

Fair enough. Macros are better for some purposes, but they can really mess things up sometimes. I can't see any way to get the effect you want.


I agree that having typedefs for the named address space
implementation might be a good thing.  They should probably start
with flash_ (rather than prog_) then, to clearly indicate they are
*different*, and need a different usage.


That would be ideal, as far as I can see.

mvh.,

David

_______________________________________________
AVR-libc-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to