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

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

RE: [avr-gcc-list] GCC Functions


From: Ron Kreymborg
Subject: RE: [avr-gcc-list] GCC Functions
Date: Thu, 29 Nov 2001 21:40:01 +1100

Have a look at page 40 of K&R Ansi C: "External and static variables are
initialised to zero by default".

-------------------------------------------
Ron Kreymborg
Jennaron Research
Melbourne, Australia

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf Of Paulo Abreu
> Sent: Tuesday, 27 November 2001 9:44 PM
> To: address@hidden
> Subject: Re: [avr-gcc-list] GCC Functions
>
>
>
> >This is basically a do-nothing, since ledlight is already 0x0 (per
> >definition, since it's a global variable).
>
> An opinion: initializing a variable to 0 is not a C standard. So, it
> is not a good approach assuming that all compilers will act as you
> state. Code will be more portable if you follow standards.
>
> Regards,
>
> Paulo Abreu
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>




reply via email to

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