avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bug #33716] pgmspace typedefs not legal


From: Georg-Johann Lay
Subject: [avr-libc-dev] [bug #33716] pgmspace typedefs not legal
Date: Sat, 09 Jul 2011 10:25:31 +0000
User-agent: Opera/9.80 (Windows NT 5.0; U; de) Presto/2.6.30 Version/10.63

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.

Johann


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?33716>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]