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,196
» Latest member: galibl1
» Forum threads: 1,008
» Forum posts: 2,779

Full Statistics

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

Latest Threads
A8-4-5: Should have an ex...
Forum: AUTOSAR C++:2014 rules
Last Post: cgpzs
Yesterday, 02:14 PM
» Replies: 2
» Views: 119
A18-9-4
Forum: AUTOSAR C++:2014 rules
Last Post: misra cpp
14-02-2025, 01:04 PM
» Replies: 3
» Views: 1,204
Rule 3-4-1 and lifetimes,...
Forum: 6.3 Basic concepts (C++)
Last Post: misra cpp
14-02-2025, 01:02 PM
» Replies: 1
» Views: 87
Application of Rule 15.0....
Forum: 4.15 Special member functions
Last Post: misra cpp
07-02-2025, 12:44 PM
» Replies: 3
» Views: 2,576
Rule 6.2.1: non-inline co...
Forum: 4.6 Basic concepts
Last Post: misra cpp
07-02-2025, 12:43 PM
» Replies: 3
» Views: 739
A7-2-1 Still relevant in ...
Forum: AUTOSAR C++:2014 rules
Last Post: misra cpp
31-01-2025, 01:20 PM
» Replies: 1
» Views: 206
MISRA AC INT:2025
Forum: MISRA AC resources
Last Post: misra-ac
22-01-2025, 03:37 PM
» Replies: 0
» Views: 147
MISRA AC SLSF:2023 AMD3
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
13-01-2025, 10:58 AM
» Replies: 0
» Views: 199
MISRA AC SLSF:2023 AMD3
Forum: MISRA AC resources
Last Post: misra-ac
13-01-2025, 10:57 AM
» Replies: 0
» Views: 193
Rule 7.0.4 - exception fo...
Forum: 4.7 Standard conversions
Last Post: misra cpp
10-01-2025, 02:26 PM
» Replies: 4
» Views: 836