Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





  Welcome
Posted by: Steve Montgomery - 06-12-2007, 11:24 AM - Forum: MISRA AC AGC discussions - No Replies

This new forum has been set up for asking questions about and discussing MISRA's \"Guidelines for the application of MISRA-C:2004 in the context of automatic code generation\" (otherwise known as MISRA AC AGC).

The Working Group responsible for the MISRA AC AGC document will consider questions posted here and if appropriate give an official response (which will be posted by the \"MISRA Reply\" user). Any other comments and responses from any posters shall not be considered an official MISRA position.

We expect to respond to questions on an approximately monthly basis so if you don't hear from us, please be patient.

Steve Montgomery
MISRA Autocode Guidelines Project Leader

Print this item

  Welcome
Posted by: Steve Montgomery - 06-12-2007, 11:20 AM - Forum: MISRA AC TL discussions - No Replies

This new forum has been set up for asking questions about and discussing MISRA's \"Modelling style guidelines for the application of TargetLink in the context of automatic code generation\" (otherwise known as MISRA AC TL).

The Working Group responsible for the MISRA AC TL document will consider questions posted here and if appropriate give an official response (which will be posted by the \"MISRA Reply\" user). Any other comments and responses from any posters shall not be considered an official MISRA position.

We expect to respond to questions on an approximately monthly basis so if you don't hear from us, please be patient.

Steve Montgomery
MISRA Autocode Guidelines Project Leader

Print this item

  Example spreadsheet
Posted by: david ward - 05-12-2007, 01:29 PM - Forum: MISRA SRfP resources - No Replies

This is the example spreadsheet that corresponds to the MISRA SRfP example in Figure 9 of the document.



Attached Files
.xls   MISRA_SRfP_example.xls (Size: 16 KB / Downloads: 19)
Print this item

  Example spreadsheet
Posted by: david ward - 05-12-2007, 01:22 PM - Forum: MISRA SRfP Discussions - No Replies

This example has been relocated to the \"Resources\" section. This section is visible to registered users after login.

Print this item

  READ ME FIRST!
Posted by: david ward - 05-12-2007, 01:21 PM - Forum: MISRA SRfP resources - No Replies

This area of the Forum provides downloadable resources associated with MISRA Publications.

Please note that by downloading a resource you accept the license conditions associated with it.

Further details are given with each file.

Print this item

  Welcome
Posted by: david ward - 05-12-2007, 09:47 AM - Forum: MISRA SA discussions - No Replies

This new forum has been set up for asking questions about and discussing MISRA's \"Guidelines for safety analysis of vehicle based programmable systems\" (otherwise known as MISRA SA and MISRA Safety Analysis).

The Working Group responsible for the MISRA SA document will consider questions posted here and if appropriate give an official response (which will be posted by the \"MISRA Reply\" user). Any other comments and responses from any posters shall not be considered an official MISRA position.

We expect to respond to questions on an approximately monthly basis so if you don't hear from us, please bear with us as we have day jobs to do too!

Print this item

  Validation of MISRA?
Posted by: acm - 04-12-2007, 04:01 PM - Forum: General Questions - Replies (12)

It is clear that implementing the MISRA code guidelines costs a lot in training, and that it bloats source code to some extent. Do the guidelines provide more benefit than their cost? I am somewhat sceptical about these benefits.

The MISRA guidelines have been in use for around a decade. There will thus surely have been some studies undertaken that demonstrate that the MISRA guidelines work, for some value of \"work\". Or, more accurately put, that determine in which circumstances they are useful and in which they are not.

I am disappointed not to be able to find any references to these studies on the MISRA web site. I wasn't able to find any with an internet search (though my googling skills are not that good).

Would somebody please point out these studies to me?

Thanks in advance!

--
Alan Mackenzie (Nuremberg, Germany).

Print this item

  Is Exemplar suite already uploaded?
Posted by: rahul_mishra - 29-11-2007, 03:00 PM - Forum: MISRA-C:2004 Exemplar Suite - Replies (6)

Hi folks,

I had read in an article by Mr. Chris Hills http://(http://www.phaedsys.org/papersese0604.html)a few days back mentioning that the exemplar suite for the MISRA-C:2004 would be uploaded in a few days.
When can I expect the exemplar suite for MISRA-C:2004 to be uploaded? If its already uploaded, could I know the url to download it from.

Regards,
Rahul Mishra

Print this item

  11.4 A cast should not be performed ...
Posted by: Frank Haug - 06-11-2007, 10:13 AM - Forum: 6.11 Pointer Type Conversions - Replies (1)

... between a pointer to object type and a different pointer to object type (advisory).

Additional comment: \" Conversions of this type may be invalid if the new pointer type requires a stricter alignment.\"

---

I think there can be further risks. I suppose - e.g. - casting a signed pointer onto an unsigned pointer (of the same bitwidth and alignment) itself is not risky. Dangerous can be to WORK with the casted pointer regarding its content, it is pointing onto. In this case the cast itself would not be dangerous, but the possibilities afterwards are.

example:

unsigned int foo (signed int* ps)
{
unsigned int* pu;

pu = (unsigned int*) ps; // assumed to be no problem itself
*pu = ... ; // assumed to be no problem itself
// but can be a problem later, when the content of the incoming pointer is used afterwards
}

Can anybody confirm ? I think it can be of interest to know the problems in more precision. Does anybody know other implications (not applying such casts) ?

Regards,
Frank

Print this item

  14.1 There shall be no unreachable code
Posted by: Frank Haug - 24-10-2007, 07:27 AM - Forum: 6.14 Control Flow - Replies (10)

The wording of 14.1 does not clarify the issue clear enough. I've discussed with several experienced persons and the common of these discussions is, that the questions only can be resolved, if someone ADDS personal interpretations. That cannot be the intension of a rule (text).

Firstly, \"defensive programming\" is not a misra rule. In my opinion this is a severe lack in/on the misra rule set. Although not explicitly defined its used in the rule text of 14.1 and its used in a confusing way: \"Code that can be reached but may never be executed is excluded from the rule (e.g. defensive programming)\".

In my tries to understand this, I refactored this sentence on following part (and nobody out of my discussions with Developers and QA Managers could give me an answer on that):

What is \"code, that can be reached but (may) never be executed\" ?

The provided example does not answer this question, because it shows code that \"exists but never will be reached\".

Maybe it helps to concretesize my intention when I re-word above sentence as follows: \"Is it possible, that code can be reached but not executed ?\"

Thanks in advance

Frank

Print this item

Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,309
» Latest member: 1fuhd
» Forum threads: 1,066
» Forum posts: 2,933

Full Statistics

Online Users
There are currently 113 online users.
» 0 Member(s) | 110 Guest(s)
Bing, Google, UptimeRobot

Latest Threads
13.2 Was TC2 correctly ap...
Forum: 8.13 Side effects
Last Post: misra-c
08-10-2026, 12:47 PM
» Replies: 1
» Views: 624
20.12 Does the stringific...
Forum: 8.20 Preprocessing directives
Last Post: misra-c
08-10-2026, 12:40 PM
» Replies: 1
» Views: 554
13.3 Should side effects ...
Forum: 8.13 Side effects
Last Post: misra-c
08-10-2026, 12:37 PM
» Replies: 1
» Views: 426
11.6 pointer to pointer t...
Forum: 8.11 Pointer type conversions
Last Post: misra-c
08-10-2026, 12:21 PM
» Replies: 2
» Views: 1,032
What is the UTLR of -1?
Forum: 8.10 The essential type model
Last Post: misra-c
08-10-2026, 12:15 PM
» Replies: 1
» Views: 597
10.3 Clarify if narrower ...
Forum: 8.10 The essential type model
Last Post: misra-c
08-10-2026, 11:57 AM
» Replies: 1
» Views: 508
It 8.12 intended to be so...
Forum: 8.8 Declarations and defnitions
Last Post: misra-c
08-10-2026, 11:50 AM
» Replies: 1
» Views: 455
Rule 0.1.1 Example f4
Forum: 4.0 Language independent issues
Last Post: cgpzs
07-10-2026, 11:07 AM
» Replies: 3
» Views: 719
Rule 6-2-2 Usage of std::...
Forum: 6.6 Statements (C++)
Last Post: misra cpp
25-09-2026, 05:43 PM
» Replies: 1
» Views: 435
M5-0-4 switch over unscop...
Forum: 6.5 Expressions (C++)
Last Post: misra cpp
25-09-2026, 01:00 PM
» Replies: 3
» Views: 532