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

Username
  

Password
  





  A question for Rule21.8
Posted by: tsukukazu - 14-07-2014, 06:28 AM - Forum: 8.21 Standard libraries - Replies (2)

Hello.

I have a question about rule 21.8.

_Exit Function that were added in C99 also has implementation-defined behavior.

Is this not included?

Best regards,
Kazuhiro Tsukushiro

Print this item

  Question on rule 4.1
Posted by: Seilo - 07-07-2014, 08:57 AM - Forum: 8.4 Character sets and lexical conventions - Replies (1)

Hello,

I need to know if my example is compliant :

Code:
int test = 0x1234;
If it's not compliant, can I have some examples to use hexadecimal affectation.

Best regards.

Print this item

  MISRA Members...
Posted by: Dip - 19-06-2014, 08:45 AM - Forum: General Questions - No Replies

Hello,

Pls. guide on the process and criteria for the "MISRA" membership.

Link: http://www.misra.org.uk/Links/tabid/63/Default.aspx --> Useful links --> MISRA Members

Print this item

  Listing a Tool in the list "Tools supporting MISRA C"
Posted by: Dip - 19-06-2014, 08:40 AM - Forum: General Questions - No Replies

Hello,

Pls. guide on the process and criteria on getting any tool/ parent company listed in the list of "Tools supporting MISRA C..." under Category "Useful links" on "MISRA" website..

Print this item

  11.5: Conversion from point to void
Posted by: michael.metivier - 17-06-2014, 02:19 PM - Forum: 8.11 Pointer type conversions - Replies (3)

According to the Exception to 11.3, it is permissible to convert a pointer to object into pointer to char, signed char, or unsigned char. There doesn't appear to be an Example within the MISRA document, but I believe it would look like

Code:
uint8_t  *p8;
uint16_t *p16;

p8 = ( uint8_t * ) p16;  /* Compliant - exception */
According to 11.5, it is permissible to convert a pointer to object into a pointer to void, but any conversion of pointer to void into pointer to object is non-compliant:
Code:
uint16_t *p16;
uint32_t *p32;
void     *p;

p = ( void * ) p16;       /* Compliant */
p32 = ( uint32_t * ) p; /* Non-compliant */
According to the C99 specification, "A pointer to void shall have the same representation and alignment requirements as a pointer to character type."
Given that the MISRA rules, themselves, allow conversion of pointer to object into both pointer to void and pointer to character, and that the spec indicates that pointer to void and pointer to character can not have conflicting alignment requirements, should it be allowed to convert from pointer to void to pointer to character:
Code:
void    *p;
uint8_t *p8;

p8 = ( uint8_t * ) p; /* Compliant? */

Print this item

  MISRA Safety Case Guideline
Posted by: tkuwayama60 - 16-06-2014, 05:41 AM - Forum: MISRA SA discussions - Replies (1)

Dear Sirs,
Hearing from colleague attended IQPC 4th International Conference “Applying ISO 26262”, I got to know MISRA is now working on Safety Case Guideline. Is there any public available draft of this ? I’m interested in how security issue is discussed within the case.

Thanks in advance,
T. Kuwayama, OTSL Inc.

Print this item

  Initialization of the form { 0 } in relation to Rule 11.9
Posted by: rgamble - 15-06-2014, 03:47 AM - Forum: 8.11 Pointer type conversions - Replies (1)

Is the following example intended to be a violation of Rule 11.9?

Code:
#include

void f(void) {
    uint16_t * var[10] = { 0 };  // violates 11.9?
}

While a strict interpretation seems to suggest this a technically a violation, Rule 9.2 specifically allows for an initializer of the form { 0 } which indicates that this (being a violation of 11.9) may not have been intended.

Print this item

  action language expression
Posted by: ggentile - 12-06-2014, 05:22 PM - Forum: MISRA AC SLSF discussions - No Replies

Why in SLSF there are no role to garantee that expression in acgtion and condition are written in such a way the C code is portable from 32 and 16 bit microcontroller ?

GG

Print this item

  Rule 10.4
Posted by: ggentile - 12-06-2014, 05:20 PM - Forum: MISRA AC AGC discussions - No Replies

The rule 10.1 and 10.4 of MISRA 2004 is vital for porting C code from 32 to 16 bit micro.
Why AC set this role to reccomended and not mandatory ?

GG

Print this item

  A question for Amplification of Rule 3.2.
Posted by: KumikoItoh - 09-06-2014, 06:35 AM - Forum: 8.3 Comments - Replies (3)

I have a question for Amplification of Rule 3.2.

Your guideline has the following description in item "Amplification" of Rule 3.2.

"If the source file contains multibyte characters, they are converted to the source character set before any splicing occurs."

However, I did not understand the aim of this description well. Will you explain the details?

Especially, I do not understand why "multibyte characters" are related to "splicing".

Do you intend to explain the supporting case ,"multibyte characters including "\" character"?

I suppose it as follows.

"\" character included in "multibyte characters" is different from "line-splicing \",so there are not mixed.

For example,
uint16_t x=0; // 表
if( b)
{
x++;
}

Even If this character"表" incudes "\" character,
this "\" is not a meaning of "line-splicing".


Is this correct?

Please teach me.

Best Regards,
Kumiko Itoh

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 313 online users.
» 0 Member(s) | 311 Guest(s)
Bing, Google

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