
Forums Search for: Misra
Any one for MISRA C++?
inMISRA is going to look at doing a MISRA C++ Is anyone interested in being on the panel? They are looking for experienced industrial embedded...
MISRA is going to look at doing a MISRA C++ Is anyone interested in being on the panel? They are looking for experienced industrial embedded C++ people rather than standards lawyers. If anyone is interested let me know and I will pass your details on to the panel chairman. He was not silly enough to put his own e-mail address up on this request :-) The main team will be fairly smal...
MISRA-C TC and Example suite
At last the MISRA-C:2004 TC and exemplar suite have been released. See http://www.misra-c2.com/forum/index.php You have to register to...
At last the MISRA-C:2004 TC and exemplar suite have been released. See http://www.misra-c2.com/forum/index.php You have to register to access the resources section where both are on free download. -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/...
MISRA-C & TC example suite released
inAt last the MISRA-C:2004 TC and exemplar suite have been released. See http://www.misra-c2.com/forum/index.php You have to register to...
At last the MISRA-C:2004 TC and exemplar suite have been released. See http://www.misra-c2.com/forum/index.php You have to register to access the resources section where both are on free download. -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/...
shame on MISRA
insample1.c (catch 22): // Misra warning: file scope static, used in one function static u8 X; static f(void) { // Misra warning: it is not...
sample1.c (catch 22): // Misra warning: file scope static, used in one function static u8 X; static f(void) { // Misra warning: it is not correct to use block scope static variable. define it at file scope static u8 Y; X = ++Y; } sample2 (another catch 22): void f(void) { u8 X; .... performing some calculations, that guarantee X
MISRA Rule 45
inHi! I would like to define a pointer to a hardware register. I have done as follows: typedef unsigned int Hw_Register; volatile...
Hi! I would like to define a pointer to a hardware register. I have done as follows: typedef unsigned int Hw_Register; volatile Hw_Register* const gp_dor_address = (Hw_Register* const)0x84501500; When checking against MISRA I get the following error: line 74: error #1703-D: MISRA Rule 45: cast from type "unsigned int" to type "Hw_Register *" not allowed volatile H...
C and MISRA, blues... (arithmetic shifts)
inI'm currently rewriting some numerical code for MISRA compliance. Signed shifts are not defined by the C-standard, and the code-checker...
I'm currently rewriting some numerical code for MISRA compliance. Signed shifts are not defined by the C-standard, and the code-checker complaints. Well - no big surprise here. I knew that and did it nevertheless. Now I have to rewrite. But do you do if you need them anyway? I need *lots* of them, so in despair I've just created this monster of unreadable code: int ArithmeticShi...
MISRA-C 2004 code checker
inHi, I need a tool to check C code MISRA-C 2004 compliance: as I need it for various embedded compiler (GNU-ARM, Freescale CodeWarrior and...
Hi, I need a tool to check C code MISRA-C 2004 compliance: as I need it for various embedded compiler (GNU-ARM, Freescale CodeWarrior and AVRStudio), I thought about an external code checker (like PC-Lint for example). What can I use? Thank you
CCS and Imagecraft
inHi, I have been talking to all the embedded compiler companies about the next version of MISRA-C ie MISRA-C:2010 and their views on...
Hi, I have been talking to all the embedded compiler companies about the next version of MISRA-C ie MISRA-C:2010 and their views on changing the reference from C95 to C99 as a basis. So far I have not managed to get any response from Imagecraft or CCS If any one has a good contact for them (is does work for them) please let me know If anyone works for an embedded compiler co...
Reason behind MISRA rule 111
inHi, I am just curious to know what the reason behind MISRA rule 111. The rule says - Bit fields shall only be defined to be one of type...
Hi, I am just curious to know what the reason behind MISRA rule 111. The rule says - Bit fields shall only be defined to be one of type unsigned int or signed int I have used UINT32 instead of unsigned int in my code but compiler has thrown a warning says - "field type should be int" Could somebody please put light on this. Thanks Vikas -----------------------------...
Reason behind MISRA rule 111
inHi, I am just curious to know what the reason behind MISRA rule 111. The rule says - Bit fields shall only be defined to be one of type...
Hi, I am just curious to know what the reason behind MISRA rule 111. The rule says - Bit fields shall only be defined to be one of type unsigned int or signed int I have used UINT32 instead of unsigned int in my code but compiler has thrown a warning says - "field type should be int" Could somebody please put light on this. Thanks Vikas ---------------------------------...
MISRA C rules 10.3 and 10.4
inHi, In MISRA-C 2004: Rule 10.4: The value of a complex expression of integer type may only be cast to a type that is narrower and of the...
Hi, In MISRA-C 2004: Rule 10.4: The value of a complex expression of integer type may only be cast to a type that is narrower and of the same signedness as the underlying type of the expression. Rule 10.3: The value of a complex expression of floating type may only be cast to a type that is narrower floating type. So why should the cast be more narrow? The Guidelines giv
If ever there is need for MISRA C then this is it!
inJust to make me feel even more insecure about flying. http://www.cashloopholes.co.uk/modules.php?name=Forums&file=viewtopic&t=28
Just to make me feel even more insecure about flying. http://www.cashloopholes.co.uk/modules.php?name=Forums&file=viewtopic&t=28
MISRA new rule suggestion
inOk, I admit this is just a personal preference of mine but I just wondered if anyone else felt the same way. So here comes the...
Ok, I admit this is just a personal preference of mine but I just wondered if anyone else felt the same way. So here comes the suggested rule "Never use characters that cannot be pronounced" Here are some highly contrived examples: (1) __loop. Well, how are you supposed to drop that into polite conversation? What if you have another variable called loop. How do you verbally differenti...
Function pointers: good or bad things?
inIn reply to my previous post, Paul Rubin says: "I think MISRA C disallows function pointers, partly for this reason." Are function...
In reply to my previous post, Paul Rubin says: "I think MISRA C disallows function pointers, partly for this reason." Are function pointers really bad things? Sincerely I found them useful and lastly I was using them more and more. Am I wrong? Function pointers help me in at least three situation. With function pointer I can isolate C modules from the rest of the project, so ...
