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

Username
  

Password
  





  MISRA C:2012 Amendment 1
Posted by: david ward - 25-05-2016, 03:53 PM - Forum: MISRA resources - Replies (2)

While it is widely considered that MISRA C provides best practice guidelines for the development of safety-related systems, the publication of ISO/IEC TS 17961:2013 "C Secure" has generated discussion on the applicability of MISRA C for secure applications.

A mapping of MISRA C coverage of the "C Secure" requirements shows that for freestanding applications, MISRA C already has excellent coverage of the "C Secure" requirements.  Additional guidelines are provided in this document to improve the coverage of the security concerns highlighted by the "C Secure" guidelines.



Attached Files
.pdf   MISRA C 2012 AMD1.pdf (Size: 205.95 KB / Downloads: 142)
Print this item

  MISRA C:2012 Addendum 2 - new edition
Posted by: david ward - 25-05-2016, 03:53 PM - Forum: MISRA resources - No Replies

While it is widely considered that MISRA C provides best practice guidelines for the development of safety-related systems, the publication of ISO/IEC TS 17961:2013 "C Secure" has generated discussion on the applicability of MISRA C for secure applications.

This document contains an updated mapping, following the publication of MISRA C:2012 Amendment 1, of MISRA C coverage of the "C Secure" requirements and shows that for freestanding applications, MISRA C has excellent coverage of the "C Secure" requirements.  The first edition has been superseded by this new edition and is no longer available.



Attached Files
.pdf   MISRA C 2012 Addendum 2 (Second Edition).pdf (Size: 114.28 KB / Downloads: 132)
Print this item

  MISRA C:2004 permits
Posted by: david ward - 25-05-2016, 03:51 PM - Forum: MISRA resources - No Replies

This document presents a number of deviation permits covering commonly-encountered use cases for use with the MISRA C:2004 guidelines. It should be used in conjunction with MISRA Compliance:2016, a companion document which describes the purpose of deviation permits and which sets out the principles by which the concept of MISRA Compliance is governed.

The number of deviation permits within this document is expected to grow and it is possible that existing deviation permits may be revised. The document contains a table with a record of these changes.

The current release is Edition 1, published April 2016.



Attached Files
.pdf   MISRA C 2004 Permits (First Edition).pdf (Size: 254.91 KB / Downloads: 37)
Print this item

  MISRA Compliance:2016
Posted by: david ward - 25-05-2016, 03:50 PM - Forum: MISRA resources - No Replies

This document is now superseded by MISRA Compliance:2020

MISRA Compliance sets out a framework for claiming compliance with MISRA coding guidelines including guidance on a robust and structured process for the use of deviations.  It includes a mechanism for establishing pre-approved "permits" to help streamline the deviation process. It supersedes the compliance, deviation and process requirements previously published in various MISRA coding guidelines.



Attached Files
.pdf   MISRA Compliance 2016.pdf (Size: 228.07 KB / Downloads: 45)
Print this item

  MISRA checking tool
Posted by: jzafra - 25-05-2016, 07:52 AM - Forum: General Questions - Replies (1)

Hi everybody,

I am looking for a tool to do compliance checks for MISRA. Preferably with Eclipse IDE plug-in and not too expensive (

Print this item

  Rule 5-2-7
Posted by: dg1980 - 24-05-2016, 11:16 AM - Forum: 6.5 Expressions (C++) - Replies (1)

Dear MISRA team,

IMHO, this rule is missing one important exception: casting to [unsigned]char* to access individual bytes is well defined in the standard (chapter 3.9 § 2)
In fact, you find this exception in MISRA C 2012 Rule 11.3.

Print this item

  Rule 2-10-5 is totaly ambiguous
Posted by: udi - 15-05-2016, 05:36 AM - Forum: 6.2 Lexical conventions (C++) - Replies (1)

Hello,

I think this rule should be rephrased (or maybe split) for clarity, and giving some more examples.
Problems are:
1. As already mentioned - function overloading.

2. It is not clear whether static variables inside function are violating this rule:
void f1() { static int nFoo; }
void f2() { static int nFoo; }
I think it does not violate (also based on my exmaples from MISRA C-2012 Rule 5.9) but my static analysis tool, thinks it does.

3. Do static class members violate this rule?
class C1 { public: static int nNumOfItems; }
class C2 { public: static int nNumOfItems; }
I think it does not.

To my understanding, this rule comes to cover 2 cases (which should be properly explained in the rationale):
1. Hiding of identifier in an internal scope
2. Conusion of 2 global static identifiers with the same name (whose scope is actualy indipendantly limited to each .cpp file)

Thanks,
Udi.

Print this item

  MISRA C:2012 Amendment 1
Posted by: Fahmi - 13-05-2016, 01:17 PM - Forum: General Questions - Replies (8)

Hi,
When the MISRA C:2012 Amendment 1 document will be available?

Regards,
Fahmi

Print this item

  Rule 10.3, conversion from complex types to real floating types
Posted by: satoshi - 11-05-2016, 07:40 AM - Forum: 8.10 The essential type model - Replies (6)

The following code can be compiled.

Code:
float f;            // sizeof(float) = 4
double d;           // sizeof(double) = 8
float _Complex fc;  // sizeof(float _Complex) = 8

d = fc;  // violate rule 10.3 ?
fc = d;  // violate rule 10.3 ?

f = fc;  // violate rule 10.3 ?
fc = f;  // OK?

The "double type" has no imaginary parts.
So, I can say "assign to narrower essential type" ?

Print this item

  Rule 18.1 and Rule 11.3 compatibility
Posted by: m.bruna - 06-05-2016, 03:29 PM - Forum: 8.18 Pointers and arrays - Replies (3)

Hi,

i am not sure about compliance of following example.

Code:
uint32_t varialble = 0;
uint8_t * ptr = (uint8_t *)variable;

(*ptr) = 0;
ptr++;        //line in question
(*ptr) = 0;        //line in question

While exception to the rule 11.3 clearly says, that converting the pointer to object to pointer to char is ok and can be used for accessing individual bytes, Rule 18.1 says that object that is not an array shall be treated as an array of single element and does not allow dereferencing a pointer beyond the end of it.

Can an object that is not an array be treated as an array of 8-bit variables with length of its byte size for this purpose? or can i only access the first byte of the object this way?

thanks,

Michal

Print this item

Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,207
» Latest member: MLBstubs
» Forum threads: 1,017
» Forum posts: 2,796

Full Statistics

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

Latest Threads
Rule 7.0.5, example non-c...
Forum: 4.7 Standard conversions
Last Post: cgpzs
17-04-2025, 12:10 PM
» Replies: 0
» Views: 168
A3-3-2 Contradictory exam...
Forum: AUTOSAR C++:2014 rules
Last Post: cgpzs
31-03-2025, 09:30 AM
» Replies: 2
» Views: 296
16.6.1 clarification
Forum: 4.16 Overloading
Last Post: cgpzs
31-03-2025, 09:29 AM
» Replies: 2
» Views: 277
Rule 9.3.1 - iteration st...
Forum: 4.9 Statements
Last Post: misra cpp
28-03-2025, 01:17 PM
» Replies: 1
» Views: 187
Rule 8.2.8 - why aren't a...
Forum: 4.8 Expressions
Last Post: misra cpp
28-03-2025, 01:05 PM
» Replies: 1
» Views: 208
Typo in Appendix C of MIS...
Forum: 8.10 The essential type model
Last Post: Yordan Naydenov
17-03-2025, 02:58 PM
» Replies: 0
» Views: 164
Adopted modal expressions...
Forum: General Questions
Last Post: Yordan Naydenov
17-03-2025, 09:01 AM
» Replies: 0
» Views: 258
Roadmap to c23 support
Forum: General Questions
Last Post: ACHart
28-02-2025, 03:23 PM
» Replies: 0
» Views: 211
Rule 6.2.1 weak linkage
Forum: 4.6 Basic concepts
Last Post: misra cpp
28-02-2025, 01:04 PM
» Replies: 1
» Views: 267
A8-4-5: Should have an ex...
Forum: AUTOSAR C++:2014 rules
Last Post: misra cpp
21-02-2025, 12:58 PM
» Replies: 3
» Views: 694