Hi David,
> All their examples have main as returning an int.
> Returning a value from main, in a microcontroller is nonsensical, isn't it?
> Where would it return that to?
> Why would I want to spend four bytes of RAM on that?
You can declare main like this instead:
void main( void )
{
....
}
If you compile your code using the -ffreestanding option, then the
compiler won't complain that main doesn't return an int.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/Message
Re: [AVR-Chat] Finally, really, actually, starting off with C
2009-01-07 by Dave Hylands