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

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

Re: [avr-gcc-list] Feature request - compiler warning for "if" stmts tha


From: rusty+avr-gcc-list
Subject: Re: [avr-gcc-list] Feature request - compiler warning for "if" stmts that do nothing
Date: Mon, 13 Dec 2004 15:50:23 -0800 (PST)

   Date: Mon, 13 Dec 2004 15:34:16 -0800 (PST)
   From: Douglas Dotson <address@hidden>
   Subject: RE: [avr-gcc-list] Feature request - compiler warning for "if" stmts
           that do nothing
   To: Dave Hylands <address@hidden>,
           Joerg Wunsch <address@hidden>,
           address@hidden

   ...
   Best solution is to develop good programming skills that avoid the
   typical pitfalls.


And also good style; I hate it when I see an empty loop done as

        while (*a++ = *b++);

It makes it so much more obvious you meant it to be empty when you
instead do

        while (*a++ = *b++)
                ;

Or even better

        while (*a++ = *b++)
                ; /* empty */


reply via email to

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