[Top][All Lists]

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

Re: [avr-gcc-list] C++ with PSTR

From: darkschine
Subject: Re: [avr-gcc-list] C++ with PSTR
Date: Sun, 6 Dec 2009 18:51:39 -0800 (PST)

Dave Hylands wrote:
> ... the two objects are in fact 100% identical, but the 2nd
> version has no warning.
> -- 
> Dave Hylands
> Shuswap, BC, Canada
> http://www.DaveHylands.com/

Bravo! I owe you a beer. compiles clean now. I did in fact have some hidden
warnings amongst the many PSTR warnings

> #include <avr/pgmspace.h>
> #ifdef __cplusplus
>     #undef PROGMEM
>     #define PROGMEM __attribute__(( section(".progmem.data") ))  
>     #undef PSTR
>     #define P_STR(s) (__extension__({static prog_char __c[] PROGMEM =
> (s);&__c[0];}))
> #else
>     #define P_STR(s) PSTR(s)
> #endif

I have been using P_STR(char*) in the hope that a solution would be found.
It also reminds me that it is not the same as PSTR(char*) in pgmspace.h
View this message in context: 
Sent from the AVR - gcc mailing list archive at Nabble.com.

reply via email to

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