"Florian-Wolfgang Stock" <[EMAIL PROTECTED]> a �crit dans le message de news: 
[EMAIL PROTECTED]
>
> I know. That is how it supposed to be : variable1 and variable2 should be 
> only
> module wide know. But the compiler places them at the same position.
> If I write/read variable2 the compiler
> generates code which refers to variable1 (see my 2nd post with the
> gdb-output).
>


Sorry, looks like I did not read your post carefully.
I was misslead by the post title combined with the stactic keyword at the 
begening of the post and concluded it was a question we often see about 
global variables.
If you are using CodeWarrior, I suggest that set it to generate a MAP file 
and that you have a look at it. If you are using another compiler, I am 
shure it also has a way to generate a map file. That way you could see if 
the probleme is realy that the compiler is assigning the same memory address 
for the two variables or if you have a buffer overrun problem.
When a variable is overriten, its often because it is overriten by a too 
long write (overrun) to a string variable that is just before that variable 
in memory.

For example, you have:
Char strText[5];
Int16 intVariable=0

and you do mome thing like:
StrPrintF(strText,"12345");

This will probably overrite intVariable with the value 0

I know its not exactly the problem you are having but it can give you a 
fresh idea where to look.

Hope this helps


-- 
Regis St-Gelais
www.laubrass.com 



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to