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

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

[avr-gcc-list] unexpected compiler behaviour


From: Chris Baugher
Subject: [avr-gcc-list] unexpected compiler behaviour
Date: Mon, 2 Sep 2002 17:01:55 -0500 (CDT)

Ok, I got avr-gcc to compile.  I just defined out the getrusage stuff in
gcc.c .  I hope that doesn't cause any problems.

Anyway I'm writing some code to write to an LCD, and I found something
wierd.  I have a function:

lcd_putstring(unsigned char *str, unsigned char len)

that just writes the string 'str' of length 'len' to the LCD.  So if I do
something like:

        unsigned char val[3];

        val[0] = '0';
        val[1] = '1';
        val[2] = '2';

        lcd_putstring(val, 3);

it works just fine.  But if I do:

        unsigned char val[3] = { '0', '1', '2' };

        lcd_putstring(val, 3);

I get the wrong characters on the display.  Are initialisations like this
not allowed?

Thanks

Chris|

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



reply via email to

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