avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] Space optimisation for PSTR()


From: Bernard Fouché
Subject: RE: [avr-gcc-list] Space optimisation for PSTR()
Date: Fri, 27 Aug 2004 18:46:46 +0200

Yeah I was wrong in the parenthesis places but you got the point.

I asked this question because I thought that compilers were used to optimise
strings that way.

Thanks for your answer

-----Message d'origine-----
De : E. Weddington [mailto:address@hidden
Envoyé : vendredi 27 août 2004 18:20
À : Bernard Fouche; address@hidden
Objet : Re: [avr-gcc-list] Space optimisation for PSTR()


E. Weddington wrote:

> Bernard Fouche wrote:
>
>> Hi there.
>>
>> It seems that if I use twice the same string in the program thru
>> PSTR(), the
>> string will be stored twice?
>>
>> For instance:
>>
>> fputs_P("blabla",OutStream);
>>
>> then later in the code:
>>
>> fputs_P("blabla",OutStream);
>>
>>
>>
>
> That probably should be:
> fputs_P(PSTR("blabla", OutStream);
> Right?
>
Correcting my correction (missing parens) :-) :
fputs_P(PSTR("blabla"), OutStream);



reply via email to

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