[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Code Optimisation question re: volatile
From: |
E. Weddington |
Subject: |
Re: [avr-gcc-list] Code Optimisation question re: volatile |
Date: |
Fri, 23 Jul 2004 09:24:25 -0600 |
On 23 Jul 2004 at 17:15, David Brown wrote:
> > On 23 Jul 2004 at 8:36, David Brown wrote:
> >
> > OT:
> >
> I don't actually give much weight to coding standards that I've seen - they
> frequently either don't go far enough, or ban a lot of constructs that are
> mostly a bad idea, but occasionally very useful. For example,
> assign-to-assignment-result can be a neat way to write things like "if (key =
> readKey()) ... ", but writing "x = *y++ = z" is never a good idea!
>
Agreed! :-)
Usually with an assignment in an if statement I also try to avoid an *implied*
condition and make it *explicit*, to avoid confusion such as:
if ((key = readKey()) != 0)
Eric
- Re: [avr-gcc-list] Code Optimisation question re: volatile, (continued)
- Re: [avr-gcc-list] Code Optimisation question re: volatile, Svein E. Seldal, 2004/07/23
- Re: [avr-gcc-list] Code Optimisation question re: volatile, E. Weddington, 2004/07/23
- Re: [avr-gcc-list] Code Optimisation question re: volatile, Joerg Wunsch, 2004/07/23
- Re: [avr-gcc-list] Code Optimisation question re: volatile, D. Daniel McGlothin, 2004/07/23
- Re: [avr-gcc-list] Code Optimisation question re: volatile, Matthew Arcus, 2004/07/23
Re: [avr-gcc-list] Code Optimisation question re: volatile, E. Weddington, 2004/07/23