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

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

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


From: Georg-Johann Lay
Subject: Re: [avr-libc-dev] [bug #33716] pgmspace typedefs not legal
Date: Tue, 27 Sep 2011 21:05:06 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Rather than deprecating the typedefs in pgmspace.h, I would suggest to
replace them by respective macros.

That would be nice, but I don't think it's possible.  There are too many
places where:

#define prog_uchar unsigned char PROGMEM

would behave differently than

typedef unsigned char PROGMEM prog_uchar;

Although I confess I'm having a hard time thinking of them...

BillW

Weddington, Eric schrieb:
Until such time that it can be shown that replacing them with macros is a safe 
alternative, then they will stay as deprecated, as deprecation is a known safe 
alternative.

If someone should discover that replacing them with macros are deemed safe, 
then a patch should be provided.

Eric

IMO such macros are bad style, there is no reason for them. Style is, of course, matter of taste.

Try
  #define PROGMEM __attribute__((progmem))
  #define prog_char char PROGMEM
  prog_char * p = 0;

@Jan:

That's the reason why a always said that progmem is something com-ple-tly different to a named address. Now you see why.

Johann



reply via email to

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