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 warningfor"if"stmtsthat do


From: David Breeze
Subject: Re: [avr-gcc-list] Feature request - compiler warningfor"if"stmtsthat do nothing
Date: Tue, 14 Dec 2004 17:35:00 +0000

Well put.  

The guidelines are imposed upon us by those who neither write nor understand 
code.  However, they are seen as a way of showing that we meet the required 
standards and yes lint is used extensively to ensure the code is ok.
As always with these things there are get outs if you have a strong enough case 
(usually documented to the point of exhaustion!).

David

>>> "Dave Hansen" <address@hidden> 14 December 2004 17:19:56 >>>
From: "E. Weddington" <address@hidden>
[...]
>Do you have link to a free copy of the MISRA guidelines?

Beware.

There's really no reason to follow the MISRA gueidelines unless your 
customer requires it.  As a rough estimate, they are about 40% good ideas, 
30% harmless, 20% incomprehensible, and the last 10% actively harmful.

The best thing I can say about them is that they describe a procedure for 
breaking them.  Because you _will_ need to break them.  In fact, rule 3 says 
"Break rule 1."  In so many words.

MISRA has just released version 2 of the guidelines.  I haven't seen those 
yet.  I hope they're better.  One can only hope they put more people on the 
committee this time who actually know something about C.

But MISRA suffers from the fallacy that replacing thinking with rules will 
result in better code.  99% of the problems MISRA tries to solve are much 
better handled with a good lint.

All IMHO, of course.  Regards,
   -=Dave



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]