> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On
> Behalf Of Georg-Johann Lay
> Sent: Saturday, July 09, 2011 4:26 AM
> To: Georg-Johann Lay; Bill Westfield; [email protected]
> Subject: [avr-libc-dev] [bug #33716] pgmspace typedefs not legal
> 
> Follow-up Comment #1, bug #33716 (project avr-libc):
> 
> As Bill already wrote, attribute progmem just works by accident in avr-gcc
> (
> and not at all in avr-g++).
> 
> It appears that
>    const prog_char c = 'a';
> works for C and not for C++.  However, there is *no* support for progmem
> in
> types it in avr-gcc and there is no guarantee that it will work for any
> code
> imagineable.
> 
> I highly recommend to deprecate types like prog_char:
> 
> typedef char __attribute__((progmem,deprecated)) prog_char;
> 
> or
> 
> typedef char __attribute__((progmem,deprecated("message"))) prog_char;
> 
> Notice that despite "progmem", "deprecated" *is* documented for types.
> 
> As the next release of avr-libc will come with bulk of poison, anyway,
> this
> bit of deprecation won't hurt and will help users to write more robust
> code.

Agreed, Johann. This should be done before the next release of avr-libc which 
will be 1.8.0.

Eric

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

Reply via email to