We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I would like to request on the next update of the ARM tools that a check box be added to allow "// style comments". This has been added to the C99 standard. This way, Stict ANSCI C can be checked along with checking "//" style comments.
Thanks, Barry Gordon ================================================== The following statement was copied from david.tribble.com/.../cdiffs.htm
Comments C++ recognizes //... comments as well as /*...*/ comments. C90 only recognizes the /*...*/ form of comments. The //... form usually produces a syntax error in C90, but there are rare cases that may compile erroneously without warning: i = (x//*y*/z++ , w); C99 recognizes both forms of comments. [C99: §5.1.1.2, 6.4.9] [C++98: §2.1, 2.7]
I just received an e-mail from keil support stating:
"Strict ISO C99 mode is planned to be added in RealView 3.1. This should be out sometime before midyear."
Oh I see - you want a "Strict, but with a weakness for '//' comments" option...?!
No, just strict 8-year old standard (C99), not an 18-year old standard (C90). I would even like a stricture standard that would produce an error if a logical statement did not evaluate to a bool that would catch an error such as
if (A = 3)
C# catches that one.
I would even like a stricture standard
Tools like Lint and the MISRA C coding rules exist for a reason. Go ahead and use them.
A compiler's task is to turn source code into executable code, not to find every possible flaw in it.