don't use C, use something else.
exactly what? buddy. it's a rant until you do not provide practical alternatives: which language for my embedded DSP ? Have you ever tried to put Ada on 8bit MPU ? Python on Chip is a crap, and I can't use Ada or Python to write drivers or RTOSs.
We are saying the sane. I am not complaining about C, just about MISRA and the whole business. If you want something strong typed and so on... ST and Resesas and TI and so on provide the automotive chips, then why the heck they do not provide something better than C ?. "Just be careful" don't use this and this and that because it may be unsafe or difficult to read..... well renesas' compiler is being used by the industry.... how about it only accepts misra compliant code ?....
Python as a RTOS ? that would be something ! I love lists and dictionaries !. There are plenty of rants about how python is unsafe and unsuited due to its nature. There is uC python... btw, it is written in C !
.
The problem is that as "de-facto standard" is the lowest kind-of portable denominator. If they (compiler writers) provide Ada for all processors... well it may help...
(void)memcpy(dst, src, (size_t) sizeof(some_var)); // some people on our team think that this is a great solution... read below...
emm, all kind of
casting is banned, buddy, and you can bypass only with the
unchecked conditions method, but in this case you have to add exceptions to the
code-checker and then justify by hands (it means writing documentation, and sign with your name); the code above will not pass up to 5 rules, including the comment line "//" is not allowed by MISRA, while "/* … */" is allowed.
[/quote]
I am complaining about this specific MISRA checker and its "usefulness", the '//' comment... I added to the text to comment on it, does not belong to the original.
I don't hate C, I just find funny the "attempt" at converting it in something it is not and was not designed to be.