shame on MISRA

Looks fine here. (Apart from some of the spelling ;) ;).)

Steve

formatting link

Reply to
Steve at fivetrees
Loading thread data ...

I accept this comment - maybe stupidity comes from people who expect

100% MISRA compliance. But unfortunately it is expected from me.

It is just an example. The same example applies to enumerated type.

a = &x[i] is absolutely equivalent to a=x+i (assuming i is an integer and a&x are pointers of the same type). It is not a big problem but it is a senseless warning. And a = x+i makes more sense in some circumstances. I acknowledge that this is my personal opinion and maybe it is not entirely correct, and it is finally minor problem - I can always use a=&x[i].

I agree.

So in order to stop hackery we should code in BASIC ?

10x, unfotunately I USE it.

yes, I acknowledge - I am stupid too.

If I'm paid to be a hooker, it will be a problem for me to be a hooker.

Reply to
disident

Correct - I have to clarify that I refer to old MISRA rules. I am not aware of latest MISRA rules. They are not freely available and I have not access to latest rules but I sincerely hope that latest rules are a lot better.

Reply to
disident

I agree but it is annoying all the time. And the official position of my employer is not clean. And also clients of my employer think that _every_ MISRA deviation is dangerous and terrible. And what I claim is that MISRA people are guilty about this situation. It is not about me - I can always find another job. It is about many poor embedded developers all over the world.

Reply to
disident

In article , snipped-for-privacy@rootshell.be writes

They are freely available.

formatting link

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris Hills

In article , snipped-for-privacy@rootshell.be writes

Well you have to be able to justify them. What deviations do you want?

What situation?

They can also find other jobs.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris Hills

Though it is not too creative just to take MISRA and revert every rule upside down.

VLV

Reply to
Vladimir Vassilevsky

Actually, it would be good to code the embedded stuff in Ada, Java or at least C#. However, hackery is a not a technical problem. The non-technical problems can't be avoided by any technical means. You may think of MISRA as something like a marching drill in the army. Albeit it is useless from the combat prospective, it makes everyone disciplined and compliant.

Not really, in the wide sense. You are leasing your head and hands, and a hooker is leasing the other body members. The top class hooker is called a celeb, the difference is only in the amount of many paid.

VLV

Reply to
Vladimir Vassilevsky

Unless he was another cheapskate looking for the zero cost version.

...and quite reasonable prices too.

--
********************************************************************
Paul E. Bennett ....................
 Click to see the full signature
Reply to
Paul E. Bennett

No problem here.

--
Chuck F (cbfalconer at maineline dot net)
   Available for consulting/temporary embedded and systems.
Reply to
CBFalconer

On Tue, 27 Mar 2007 09:38:01 +0100, Chris Hills wrote in comp.arch.embedded:

[snip]

[snip]

Chris, please be sure to post here when these things are available. Like most people, I do not visit the MISRA web site very often because, let's face it, it does not change very often.

Also, if you are looking for outside reviewers and/or beta users of the TC or new version, I am willing to participate. Just email me at my completely undisguised address.

I work, these days, in safety critical embedded control for medical devices, and we have incorporated a large part of MISRA C in our coding standards for several years now. I'll supply my company affiliation via email if you want it.

--
Jack Klein
Home: http://JK-Technology.Com
 Click to see the full signature
Reply to
Jack Klein

This can of course be made safer by a compiler if it is transformed to

N = /* complicated expression */ ASSERT(N >= &u8Ptr2[0]); ASSERT(N < &u8Ptr2[MAX]); a = u8Ptr2[N];

Much harder to do with a pointer

--
Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
Ulf Samuelsson

Anything that limits creativity is annoying. Everything that allows creativity is limiting.

MISRA would be dead today if it didn't help developers to be careful about what they write and to solve mistakes at an early stage. Especially if missing a deadline means endangering the jobs of hundreds of people.

Sure, it is possible to be careful and not be MISRA-compliant, but should your boss trust _all_ his developers to be careful enough _all_ the time?

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

In news:eu9gbn$pt4$1$ snipped-for-privacy@news.demon.co.uk timestamped Mon, 26 Mar

2007 23:14:28 +0100, "Paul E. Bennett" posted a response to an excellent example of classic MISRA C being awful: "I hope you are referring to the latest examples/code snippets released (earlier this year I think) and not the snippets that came out with the earlier version of the MISRA guidelines. Engineers should all be working to current best practice and that means mindful of the latest and emergent standards. [..]"

MISRA does not do so. From

formatting link
:

"[..]

Is C99 covered?

MISRA-C:2004 is based on the C language as defined by ISO 9899:1990 (plus corrigenda). C99 has not been considered in MISRA-C:2004 due to the limited support for C99 on embedded microprocessors.

[..]"
Reply to
Colin Paul Gloster

Unless he was another cheapskate looking for the zero cost version.

...and quite reasonable prices too."

The Ada standard is available for gratis.

Reply to
Colin Paul Gloster

I had been unaware of this. How? Does this apply to all such sets of rules?

"...and the fault with MISRA is...?

[..]"

If it does not prohibit the practices it is supposed to, then that is a problem.

Reply to
Colin Paul Gloster

In news: snipped-for-privacy@phaedsys.demon.co.uk timestamped Mon, 26 Mar

2007 23:00:21 +0100, Chris Hills posted: "In article , snipped-for-privacy@rootshell.be writes [..]

And who are you to say this? You hide behind a fake email address. Identify yourself, make the comments again ."

One does not need to identify one's self to make a comment. Do you deny that the warning messages which were alleged are invalid? People are unimportant. Truth is important.

Reply to
Colin Paul Gloster

In article , Colin Paul Gloster writes

I should have thought that was self evident.

However snipped-for-privacy@rootshell.be made anonymous allegations against the MISRA team. I just asked him to identify them and repeat them.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris Hills

In article , Colin Paul Gloster writes

As has been said you need to read and understand not quote the letter... :-)

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris Hills

In article , Vladimir Vassilevsky writes

I just did it for fun. Also trying to invert the rules was a useful test of the rule.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris Hills

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.