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

Username
  

Password
  





  Inlcude rule 19.11
Posted by: ggentile - 01-08-2011, 04:55 PM - Forum: MISRA AC AGC discussions - Replies (1)

Rule 19.11
Double include protection. This rule is still OBL also for AC. May you provide some more detail on the rationale behind the necessity for this rules ?

best regards
Giacomo

Print this item

  Rule 043I
Posted by: Ale_mm - 13-07-2011, 06:50 AM - Forum: MISRA AC SLSF discussions - Replies (2)

Hello,

I've a doubt regarding the rule 043I of SLSF set. The rule tells: "In all flow-charts and graphical functions, exactly one unconditional transition must begin at every junction (except for the last junction). Every decision point (junction) must have a default path."
The problem is about the bounds of this rules, because it'd delimited only for flow-charts. Since a flowchart contains none or one state, the rule is not applied in case that I have a junction, without a default path, between two state.
Therefore my question is, why this rule (and as far as I know, no others) does not check default paths in junctions between states? Or else, why this rule is only flowcharts circumscribed and not statecharts as well?


Many thanks in advance,
any feedback will be really appreciated,

Alessandro

Print this item

  MISRA AL SLSF - Rule 043I
Posted by: Ale_mm - 27-06-2011, 07:38 AM - Forum: MISRA AC SLSF discussions - Replies (1)

Hello,

I've a doubt regarding the rule 043I of SLSF set. The rule tells: "In all flow-charts and graphical functions, exactly one unconditional transition must begin at every junction (except for the last junction). Every decision point (junction) must have a default path."
The problem is about the bounds of this rules, because it'd delimited only for flow-charts. Since a flowchart contains none or one state, the rule is not applied in case that I have a junction, without a default path, between two state.
Therefore my question is, why this rule (and as far as I know, no others) does not check default paths in junctions between states? Or else, why this rule is only flowcharts circumscribed and not statecharts as well?


Many thanks in advance,
any feedback will be really appreciated,

Alessandro

Print this item

  Rule #8.7 for "special function registers" and others?
Posted by: gs - 15-06-2011, 07:39 PM - Forum: 6.8 Declarations and Definitions - Replies (3)

Does this rule apply to objects which cannot be declared at block scope, like special function register variables?

Print this item

  if-statement with two checks with different data types
Posted by: MaWu - 07-06-2011, 08:02 AM - Forum: 6.10 Arithmetic Type Conversions - Replies (7)

Hi everyone!

I have a question about rule 10.1 and 10.2
Whenever I try to work with an if or while and use two comparions which are logically connected I get an MISRA issue when the two comparisons have different data types.
e.g. int16 and int32
Because the results of the two comparions is somehow boolean I would not expected to get:
The value of an expression implicitly converted to a different type.

Is it really an issue? I know I can cast both to the same data type but it looks strange.

Example:

Code:
t_int8 a = 3;
t_uint16 b = 7;
  
if ((a > 3) && (b > 5u))
{
   a++;  
}

Print this item

  Is rule 7-5-3 really relevant?
Posted by: triboix - 27-05-2011, 10:24 AM - Forum: 6.7 Declarations (C++) - Replies (1)

Hello,

Is rule 7-5-3 really relevant?

It says that something like

Code:
int& f(int& x)
{
    return x;
}
is not compliant.

But surely all C++ developers on the planet would expect x to be modified here after calling f:
Code:
void f(int& x)
{
    x++;
}

So why returning x directly would be an issue? I guess there is probably something I am not seeing here!

Thanks for any clarification!

Fabrice

Print this item

  Formal Verification of Automotive SW
Posted by: M.K. Srivas - 18-05-2011, 10:21 AM - Forum: MISRA SA discussions - No Replies

Hi:

Does either ISO 26262 or MISRA SA documents provide any guidelines or requirements regarding use of "formal verification techniques" for ensuring correctness of safety-critical automotive SW? ANy benchmarks?

Can I get any references to significant works in applying formal verification techniques to auto-motive SW?

I'd appreciate if you can provide feedback.

Thanks and regards,

Srivas

Print this item

  16.3
Posted by: beckschulze - 15-04-2011, 12:52 PM - Forum: 6.16 Functions - Replies (5)

Just to make sure, does rule 16.3 also apply to declarations of function pointers?

void (*pt2Function)(int);

Sould I give a name to the parameter?
Does that make sense at all?

Print this item

  19.4 - is typedef considered to be a type qualifier?
Posted by: mishak - 14-04-2011, 04:07 PM - Forum: 6.19 Preprocessing Directives - Replies (1)

The C standard states that "The typedef specifier is called a ‘‘storage-class specifier’’ for syntactic convenience only;".

Does 19.4 allow a macro to expand to 'typedef'?

Print this item

  Underlying type for integer constant expressions
Posted by: Mats Fors - 12-04-2011, 09:30 AM - Forum: 6.10 Arithmetic Type Conversions - Replies (1)

The initialization:
uint8_t d = ((uint8_t) 0x1U) | ((uint8_t) 0x2U);
should, according to the MISRA-C guidelines, generate an error for rule 10.1. The initializer, i.e. the integer constant expression, has the underlying type of uint8_t, but that type is overruled by the explicit rule for integer constant expressions in 6.10.4 that says that the signedness/unsignedness of the underlying type should be taken from the actual type of the integer constant expression, but only if it is signed or unsigned int. In this case it is signed int. Giving the rule 10.1 breakage. Is this really the intention of the MISRA-C guidelines for integer constant expressions?

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 81 online users.
» 0 Member(s) | 77 Guest(s)
Bing, Facebook, 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: 625
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: 428
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: 725
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: 436
M5-0-4 switch over unscop...
Forum: 6.5 Expressions (C++)
Last Post: misra cpp
25-09-2026, 01:00 PM
» Replies: 3
» Views: 538