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"stmtsthatdo


From: David Breeze
Subject: Re: [avr-gcc-list] Feature request - compiler warning for"if"stmtsthatdo nothing
Date: Tue, 14 Dec 2004 16:53:16 +0000

Thank you I was unaware of that source.

David

>>> Marc Wetzel <address@hidden> 14 December 2004 16:45:19 >>>
E. Weddington wrote:

> David Breeze wrote:
>
>>
>>> I can't resist any longer.  I always do this:
>>>   
>>
>>
>>  
>>
>>> while ( *a++ = *b++ ) { }
>>>   
>>
>>
>>  
>>
>>> This seems to me to state clearly that I haven't forgotten the body 
>>> and that
>>> I intend it to be empty.
>>>   
>>
>>
>>  
>>
>>  
>>
>
> Oh, all right, I'll chime in too.
>
> I also do the above for the same reason. If someone *really* wanted to 
> be pedantic, they could put in a comment:
>
> while(*a++ = *b++)
> {
>    // Intentionally empty.
> }
>
>
>> Better!  Also for those of us where safety is an issue "continue" and 
>> "break" statements from while or for loops are to say the least 
>> frowned upon/banned.  See MISRA guidelines.
>>
>>  
>>
>
> Do you have link to a free copy of the MISRA guidelines?
>
> Eric
>
>
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden 
> http://www.avr1.org/mailman/listinfo/avr-gcc-list 
>

A short overview is in (starting pages in german, later continues in 
english)
http://www.automotive-his.de/download/HIS_SubSet_MISRA_C_1.0.3.pdf

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed.  If 
an addressing or transmission error has misdirected
this e-mail, please notify the author by replying to this e-mail.  If you are 
not the intended recipient you must not use, disclose, copy, print or rely on 
this e-mail.

Joy Mining Machinery Limited/P&H Minepro Services aims to prevent the 
propagation of viruses, but cannot guarantee that this email is virus free.  
You are advised to scan all attachments and open them at your own risk.

Joy Mining Machinery Limited/P&H Minepro Services may monitor outgoing and 
incoming e-mails and other telecommunications on its e-mail and 
telecommunication systems.
<<Privacy - UK>>


reply via email to

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