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

Username
  

Password
  





  MISRA SW metrics
Posted by: adytzul_ac - 29-06-2010, 08:32 AM - Forum: General Questions - Replies (1)

Hello.

Are there any code metrics defined by MISRA?

Thanks.

Print this item

  Function returning pointer to array - Rule 17.4
Posted by: Greg Middleton - 24-06-2010, 01:24 PM - Forum: 6.17 Pointers and Arrays - Replies (5)

I have a function returning a pointer to an array, not an uncommon situation I would think.
How can I reference elements in that array without violating Rule 17.4 ?.
1. Indexing is not compliant as the return type is not an array.
2. Pointer arithmetic is not compliant.
So it looks like returning pointers to arrays is effectively banned by this rule, is that the case?.

Print this item

  what means about "Before preprocessing" in Rule[14.3]
Posted by: linglingma - 23-06-2010, 12:33 PM - Forum: 6.14 Control Flow - Replies (3)

"Before preprocessing, a null statement shall only occur on a
line by itself; it may be followed by a comment provided that
the first character following the null statement is a white-space
character." in this rule,why "Before preprocessing"is used as a condition?
Thanks!

Print this item

  about rule20_5
Posted by: Manisha Nikambe - 15-06-2010, 06:38 AM - Forum: 6.20 Standard Libraries - Replies (2)

void func()
{
int errno;//does even declaration of errno violates rule20_5,errno is user defined?
}

Print this item

  Assigning literal 0 to an unsigned variable
Posted by: gs - 11-06-2010, 03:45 PM - Forum: 6.10 Arithmetic Type Conversions - Replies (3)

Should literal 0 be exempt from rule 10.1? True, rule 10.6 requires a 'U' suffix in this case. However, what about in regards to rule 10.1 by itself?

Print this item

  about rule20.5
Posted by: raghaw_k - 25-05-2010, 12:18 PM - Forum: 6.20 Standard Libraries - Replies (8)

According to the rule 20.5, error indiaction facility should not be used even if it is well defined.
1)Is it mean that we should not declare the identifier(function and variable) with the name "errno"?
2)As per the standard library for linux "errno" MACRO is defined to function pointer call and for Visual C++ it is extern variable declaration. So does usage of "errno"(i.e. function call) on linux also violates the rule 20.5?

Print this item

  MISRA usage
Posted by: ggentile - 12-05-2010, 06:23 PM - Forum: General Questions - No Replies

We bought a single license for MISRA C document. We are developping an internal tool to check MISRA rules, is it possible to use the description of each rule in the helper of the tool ?
Or exist any restriction also in the usage of the rules description ?

Giacomo

Print this item

  Was something missed for 12.6 about "?:"?
Posted by: gs - 06-05-2010, 03:25 PM - Forum: 6.12 Expressions - Replies (1)

The wording of advisory #12.6 indicates expressions other than effectively boolean ones are permitted as the conditional argument to "?:". Was this wording an oversight? In three other circumstances, the guidelines insist on effectively boolean expressions and it seems unintuitive to not require such in this case as well.

Print this item

  namelengthmax
Posted by: ggentile - 29-04-2010, 10:29 AM - Forum: MISRA AC SLSF discussions - Replies (3)

I didn't find any limitation in MISAR AC* in the usage of matlab lenght identifier.

Where I am wrong ?

Giacomo

Print this item

  6.4 and 6.5 with respect to unnamed bit fields?
Posted by: gs - 27-04-2010, 04:24 PM - Forum: 6.6 Types - Replies (1)

Do rules #6.4 and 6.4 apply to unnamed bit fields? I would think, since the such fields are unnamed, one would not easily access them.

Print this item

Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,208
» Latest member: jablodan
» Forum threads: 1,017
» Forum posts: 2,796

Full Statistics

Online Users
There are currently 100 online users.
» 0 Member(s) | 97 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: 185
A3-3-2 Contradictory exam...
Forum: AUTOSAR C++:2014 rules
Last Post: cgpzs
31-03-2025, 09:30 AM
» Replies: 2
» Views: 316
16.6.1 clarification
Forum: 4.16 Overloading
Last Post: cgpzs
31-03-2025, 09:29 AM
» Replies: 2
» Views: 299
Rule 9.3.1 - iteration st...
Forum: 4.9 Statements
Last Post: misra cpp
28-03-2025, 01:17 PM
» Replies: 1
» Views: 196
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: 217
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: 179
Adopted modal expressions...
Forum: General Questions
Last Post: Yordan Naydenov
17-03-2025, 09:01 AM
» Replies: 0
» Views: 286
Roadmap to c23 support
Forum: General Questions
Last Post: ACHart
28-02-2025, 03:23 PM
» Replies: 0
» Views: 221
Rule 6.2.1 weak linkage
Forum: 4.6 Basic concepts
Last Post: misra cpp
28-02-2025, 01:04 PM
» Replies: 1
» Views: 279
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: 725