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

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

Re: [avr-gcc-list] char arrays not being initilized


From: Chris Baugher
Subject: Re: [avr-gcc-list] char arrays not being initilized
Date: Sat, 19 Oct 2002 19:27:11 -0500 (CDT)

Yeah, I brought this up awhile ago.  AFAIK it hasn't ever been fixed.  I
could attempt to track down the problem but it would take a year and a
half.

C|

On Thu, 17 Oct 2002, Lorne Gutz wrote:

>         If I define a char array like....
>       char    test[] = "this is a test";
>
>       The space for the array is allocated but the initilization
> is never done properly.  I can read or write to and element
> of that array eg   test[3] = 'f';    and everythis is fine.
>
>       Presently I am using gcc-3.2 on LINUX.  I have rebuild
> my cross compiler as suggested in the latest gcc  avr-libc-20020203.
> Earlier I was using gcc-3.0.3 and had the same results.
>
>      Now the weird thing is that a system was put together on an old
> NT box and everything worked fine!!!!
>
>      I have seen this problem discribed here before but I don't
> ever recall seeing and answer.
>
>       I have spend some time digging into this problem and it seems
> that it relates to the wrong registers being set up when the data is
> copied into the array.  I tried it with a strcpy() with the same
> results.  I have looked at the machine code that gets produced
> but not too sure of just what is wrong.
>
>       So were I stand now is,......has someone else found a
> solution for this problem, or should I keep digging???
>
>
> Lorne
>
>
>
> avr-gcc-list at http://avr1.org
>

avr-gcc-list at http://avr1.org



reply via email to

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