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

Username
  

Password
  





  Guidelines for Automotive Safety Arguments published
Posted by: david ward - 27-09-2019, 01:20 PM - Forum: MISRA Safety Arguments discussions - No Replies

The MISRA Guidelines for Automotive Safety Arguments are now available to purchase from the MISRA webstore.

The guidelines provide clarity on how to develop Safety Arguments in line with existing standards such as ISO 26262, with a view to justifying that the risk associated with an automotive system is within industry norms. Types of evidence to support the argument are also suggested, as well as advice on practical application.

One of the specific motivations for developing these guidelines was to support the requirements for a safety case in ISO 26262. Since ISO 26262:2018 the safety case is now explicitly required to be based on an argument.

Print this item

  Any on-line MISRA reference material with examples?
Posted by: sw_test - 09-09-2019, 03:35 PM - Forum: General Questions - Replies (1)

Hi,

I was wondering if there is any on-line reference material with examples of different MISRA compliance rules and how to fix the issues properly? or is it all only available through the MISRA webstore? https://www.misra.org.uk/Buyonline/tabid...fault.aspx

I'm looking for a way to link to examples for the different MISRA rules but not really seeing something that is similar to seeing issues with CWE, like: http://cwe.mitre.org/data/definitions/825.html

Is there anything similar for the MISRA compliance side of things?

Thanks.

Print this item

  Rule 5.8: identifiers of interest
Posted by: sca2012 - 03-09-2019, 08:24 PM - Forum: 8.5 Identifers - Replies (1)

The main goal of rule 5.8 (as well as 5.9), judging from the examples and amplifications, is to ensure that identifiers referring to objects or functions are not confused with the same identifiers that refer to different objects or functions.

How about identifiers that are reused by do not refer to neither objects nor functions?

For instance, a struct member:

Code:
int i;

struct S {
    int i;    // identifier is reused but cannot actually be confused with the object i at line 1
};
Is this scenario still a violation to the rule?

Print this item

  Rule 0-1-7 Exception clarification
Posted by: udi - 01-09-2019, 01:36 PM - Forum: 6.0 Language independent issues (C++) - Replies (1)

Hi,

I have 3 questions:
1. Why in the exception for the rule, a C-style cast was used (like in case #1 below), instead of functional notation cast (like in case #2 below)?
2. Does using a functional notation cast violates this rule?
3. Is it legit to do the cast through a typedef as shown in case 3 (or 4 in case that functional notation cast is allowed for that purpose)?

Thanks,
Udi.
==== Below are the referenced code examples ===
namespace SE
{
typedef void UnusedRetVal;
}

1. (void)std::strtol(pszValue, &pszEndPtr, 10); // copmliant
2. void(std::strtol(pszValue, &pszEndPtr, 10)); // not compliant ?
3. (SE::UnusedRetVal)std::strtol(pszValue, &pszEndPtr, 10); // not compliant ?
4. SE::UnusedRetVal(std::strtol(pszValue, &pszEndPtr, 10)); // not compliant ?

Print this item

  Use a subset of MISRA Rules
Posted by: gauthamkrishnan.r - 23-08-2019, 12:01 AM - Forum: General Questions - Replies (3)

Can I use only a subset of the MISRA C:2012 Guidelines for my project?

Print this item

  Clarification for Rule 5-2-4
Posted by: abgs - 26-07-2019, 02:06 PM - Forum: 6.5 Expressions (C++) - Replies (1)

1. Does the phrase "functional notation cast" in the rule correspond to what the C++ standard calls an "Explicit type conversion (functional notation)", or is there a distinction?

2. Does the phrase "explicit constructor call" in the rule mean "explicit-constructor call" (a call to a constructor declared with the 'explicit' specifier) or "explicit constructor-call" (an explicit call to a constructor, as opposed to an implicit conversion that uses a user-defined converting constructor)?

3. The rationale refers to dangers associated with casts that "do not invoke a converting constructor", however a "converting constructor" is a constructor that was *not* declared with the 'explicit' specifier. Was this intended to refer to casts that *do* invoke a converting constructor [as opposed to an explicit constructor]?

4. In the first compliant example with the expression 'A(10)' the declared constructor 'A(int32_t)' is declared with the explicit specifier. Would the 'A(10)' example be non-compliant if this constructor declaration lacked the 'explicit' specifier?

5. In later versions of the C++ standard, "Explicit type conversion (functional notation)" includes a type name followed by a braced list, e.g. 'X{5}', which may be used for aggregate initialization for 'struct X { int32_t a; };'. Is it within the original spirit of the rule to include this sytnax?

Print this item

  What is "a genuine issue that is not a violation" in "3.4 Investigating messages"?
Posted by: yohura - 25-07-2019, 01:20 AM - Forum: MISRA Compliance discussions - Replies (1)

Hi all,

I'm not sure about "Diagnosis of a genuine issue that is not a violation" in "3.4 Investigating messages".
Are there any example of genuine issue that is not a violation ?

Best regards,

Print this item

  Welcome!
Posted by: david ward - 24-07-2019, 01:40 PM - Forum: MISRA Compliance discussions - No Replies

This new forum has been set up for asking questions about and discussing MISRA Compliance:2016 "Achieving compliance with MISRA Coding Guidelines"

The MISRA C Working Group will consider questions posted here and if appropriate give an official response (which will be posted by the "misra-c" 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!

Please note some previous forum questions have been moved into here as a more appropriate location.

Print this item

  Underlying type's implicit conversion of the shift operators
Posted by: chill - 19-07-2019, 11:49 AM - Forum: 6.5 Expressions (C++) - Replies (1)

Is there a implicit conversion in shift expressions?

Quote:The underlying type of the result is the underlying type of the shift-expression.

[code]
int8_t i8;
uint8_t u8;
uint32_t u32;
int32_t i32;

u32 + i8; // i8 -> u32
u32 += i8; // i8 -> u32

u32

Print this item

  How to deal mandatory rules in the MISRA compliance 2016?
Posted by: yohura - 11-07-2019, 07:10 AM - Forum: MISRA Compliance discussions - Replies (2)

I'm reviewing code based on the MISRA compliance 2016, and want to know interpretation of mandatory rules in the adopted code.
In MISRA compliance 2016, violate mandatory rules must not be permitted, but "non-compliant adopted code" is reasonable to deviate the rules.
Should I fix the code pointed out by mandatory rules, or need not ?

Print this item

Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,171
» Latest member: stephanmuench
» Forum threads: 998
» Forum posts: 2,752

Full Statistics

Online Users
There are currently 300 online users.
» 0 Member(s) | 298 Guest(s)
Bing, Google

Latest Threads
Rule 6.2.1: non-inline co...
Forum: 4.6 Basic concepts
Last Post: cgpzs
9 hours ago
» Replies: 0
» Views: 15
Rule 0.1.2
Forum: 4.0 Language independent issues
Last Post: stephanmuench
Yesterday, 01:12 PM
» Replies: 0
» Views: 29
A18-9-4
Forum: AUTOSAR C++:2014 rules
Last Post: cgpzs
23-10-2024, 12:04 PM
» Replies: 2
» Views: 353
A8-4-5: are partial moves...
Forum: AUTOSAR C++:2014 rules
Last Post: misra cpp
22-10-2024, 02:03 PM
» Replies: 1
» Views: 312
model information blocks ...
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
22-10-2024, 01:27 PM
» Replies: 1
» Views: 4,434
MISRA AL SLSF - Rule 043I
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
22-10-2024, 01:11 PM
» Replies: 1
» Views: 8,849
MISRA AC EC guidelines
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
21-10-2024, 08:21 AM
» Replies: 4
» Views: 15,473
News on future releases
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
21-10-2024, 08:05 AM
» Replies: 1
» Views: 5,678
Signal naming convention ...
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
21-10-2024, 07:57 AM
» Replies: 1
» Views: 7,231
Rule 7.0.2: operator cons...
Forum: 4.7 Standard conversions
Last Post: karos
14-10-2024, 08:52 PM
» Replies: 2
» Views: 414