Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] gnuarm question

2006-02-11 by Tom Walsh

G B wrote:

>Sean,
>
>Thanks.  Does this mean the compiler does not 'move' strings like this
>into ram?  So, I need not worry about the 'const' label?
>I have a huge font array that I want in flash of course.
>
>  
>
Double check by looking in the listings file (.lst), not always is a 
const stored in the .rodata section.  Sometimes, if you get warnings, it 
may mean to the compile that you intend on ignoring the const definition 
may intend to change it.  Thus, it will take that implication and store 
in .data instead.  The warning doesn't mean it will not put it into 
.rodata, but...

I like my compiles clean, no warnings.

Regards,

TomW




>TIA
>
>Glen
>
>
>Sean wrote:
>  
>
>>test.c:32: warning: passing arg 1 of `is_any' discards qualifiers from 
>>pointer target type
>>
>>this is because you're passing a "const uchar *" as a "uchar *" 
>>param.  Changing either the function to is_any(const unsigned char 
>>*,char)  or removing const from the string declaration removes this 
>>warning, but it's only a warning, it won't effect the execution.
>>
>>-- Sean
>>
>>    
>>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>  
>


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.