Thanks Dave, I'd never have found that compiler option!
DLC
Dave Hylands wrote:
> 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.
>
--
-------------------------------------------------
Dennis Clark TTT Enterprises
www.techtoystoday.com
-------------------------------------------------Message
Re: [AVR-Chat] Finally, really, actually, starting off with C
2009-01-07 by dlc