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

Username
  

Password
  





  6.1, 6.2 and casts?
Posted by: gs - 18-03-2010, 02:31 PM - Forum: 6.6 Types - Replies (1)

Does rule 6.1 permit a numeric value to be cast to plain char type and then assigned to an object of plain char?
Does rule 6.2 permit a character value to be cast to signed/unsigned char type and then assigned to an object of signed/unsigned char?

Print this item

  Rule 14.3
Posted by: mshearer123 - 17-03-2010, 03:50 PM - Forum: 6.14 Control Flow - Replies (3)

Hi,
I am running into this rule whenever using in-line assemebly in my blackfin project.

i.e

asm ("ssync;");
or
asm("nop;");

generated the error in ibm logiscope
"A null statements shall only occur on a line by itself, and shall not have any other text on the same line"

I assume this comes from having the two ";" characters on the one line.
But how can i overcome this?

Matthew

Print this item

  Should #17-0-2 include any non-function identifier?
Posted by: gs - 16-03-2010, 02:11 PM - Forum: 6.17 Library introduction (C++) - Replies (1)

A discussion of a similar rule for MISRA C concluded the rule was meant to encompass any reserved identifier. While MISRA C++ has excluded functions from this rule and placed their consideration under rule #17-0-3, no mention of standard types (e.g, clock_t) or any other non-function identifier is made as far as I can tell. Should the rule include these also?

Print this item

  8.7 if applied to C++
Posted by: gs - 15-03-2010, 06:25 PM - Forum: 6.8 Declarations and Definitions - Replies (2)

Suppose one wanted to ensure one's C++ code complied with the MISRA C guidelines. Would a static data member of a struct or class be permitted to be accessed by only one function or should that static member be defined at block scope? Suppose the struct/class type were a local one? Would moving the definition of the static member out of the class and directly into block scope provide any benefit?

Print this item

  compiler library files
Posted by: mshearer123 - 12-03-2010, 10:31 AM - Forum: General Questions - Replies (2)

Hi,
I am currently working on a Blackfin project, developing in VISUAL DSP++

I would like to bring this to MISRA, however if i use "include" files such as stdio.h or ccblkfn.h do they comply with MISRA?

I have tried to bring any include files into my local workspace so that logiscope can run through them aswell, this results in hundreds of violations from the files.

Can I claim MISRA compliance with these files? or is there an alternative route i.e. buying MISRA compliant librarys?

Thanks for any advice,

Matthew

Print this item

  Rule 19.15 #include ssyntax, bad name
Posted by: mshearer123 - 02-03-2010, 03:54 PM - Forum: 6.19 Preprocessing Directives - Replies (4)

Hi,

My header files all include #ifndef / #define 's to stop them being included twice, however apparently the name is bad.

i have things like
#ifndef __DMA_h
#define __DMA_h
#endif


and

#ifndef __flash_h
#define __flash_h
#endif

Also changing to the following gives the same error

#ifndef flash_h
#define flash_h
#endif

any help would be great,

Matt

Print this item

  Rule 3.4: All uses of the #pragma directive shall be...
Posted by: mshearer123 - 02-03-2010, 11:32 AM - Forum: 6.3 Documentation - Replies (3)

Hi,
What exactly does this rule mean?
How do i document a #pragma?

thanks,

Matt

Print this item

  Rule 10.1 (DSP code)
Posted by: mshearer123 - 01-03-2010, 02:06 PM - Forum: 6.10 Arithmetic Type Conversions - Replies (2)

Hi,

My code for running a blackfin DSP uses pointers to registers to set specific register values.

i.e.

Code:
*pSPI_FLG = 0x01;

however this generates a MISRA compliancy error.

what other way round this is there?

thanks for any help


matt

Print this item

  8.7 wording?
Posted by: gs - 25-02-2010, 07:47 PM - Forum: 6.8 Declarations and Definitions - Replies (4)

Am I correct in presuming "Objects shall be defined at block scope if they are only accessed from within a single function," should read declared instead of defined?

Print this item

  Exemplar suite for C++
Posted by: azukich - 19-02-2010, 03:20 PM - Forum: C++ General - Replies (2)

Is there an exemplar suite for C++? If not is this in the plans to create this?

Thank you

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 292 online users.
» 0 Member(s) | 290 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: 35
Rule 0.1.2
Forum: 4.0 Language independent issues
Last Post: stephanmuench
21-11-2024, 01:12 PM
» Replies: 0
» Views: 44
A18-9-4
Forum: AUTOSAR C++:2014 rules
Last Post: cgpzs
23-10-2024, 12:04 PM
» Replies: 2
» Views: 394
A8-4-5: are partial moves...
Forum: AUTOSAR C++:2014 rules
Last Post: misra cpp
22-10-2024, 02:03 PM
» Replies: 1
» Views: 336
model information blocks ...
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
22-10-2024, 01:27 PM
» Replies: 1
» Views: 4,459
MISRA AL SLSF - Rule 043I
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
22-10-2024, 01:11 PM
» Replies: 1
» Views: 8,875
MISRA AC EC guidelines
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
21-10-2024, 08:21 AM
» Replies: 4
» Views: 15,522
News on future releases
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
21-10-2024, 08:05 AM
» Replies: 1
» Views: 5,706
Signal naming convention ...
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
21-10-2024, 07:57 AM
» Replies: 1
» Views: 7,258
Rule 7.0.2: operator cons...
Forum: 4.7 Standard conversions
Last Post: karos
14-10-2024, 08:52 PM
» Replies: 2
» Views: 448