<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Adding // style comment</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/21158/adding-style-comment</link><description> 
I would like to request on the next update of the ARM 
tools that a check box be added to allow &amp;quot;// style 
comments&amp;quot;. This has been added to the C99 standard. 
This way, Stict ANSCI C can be checked along with checking &amp;quot;//&amp;quot; style
comments. 

 
Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Adding // style comment</title><link>https://community.arm.com/thread/112574?ContentTypeID=1</link><pubDate>Sat, 06 Jan 2007 07:51:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7bc337e4-7393-4639-8669-a154e50ec847</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;I would even like a stricture standard&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Tools like Lint and the MISRA C coding rules exist for a reason.
Go ahead and use them.&lt;/p&gt;

&lt;p&gt;
A compiler&amp;#39;s task is to turn source code into executable code, not
to find every possible flaw in it.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding // style comment</title><link>https://community.arm.com/thread/98791?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2007 23:10:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9d0461aa-2fe1-4674-b7e5-5035a3c8be76</guid><dc:creator>barry gordon</dc:creator><description>&lt;p&gt;&lt;p&gt;
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&lt;/p&gt;

&lt;pre&gt;
  if (A = 3)
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
C# catches that one.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding // style comment</title><link>https://community.arm.com/thread/88116?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2007 18:40:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8a8fee4f-0463-4ca2-bfcb-870d14e407ca</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Oh I see - you want a &lt;i&gt;&amp;quot;Strict, but with a weakness for &amp;#39;//&amp;#39;
comments&amp;quot;&lt;/i&gt; option...?!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding // style comment</title><link>https://community.arm.com/thread/47537?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2007 17:44:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bead2c55-524b-4ccf-983c-b1f561405ee8</guid><dc:creator>barry gordon</dc:creator><description>&lt;p&gt;&lt;p&gt;
I just received an e-mail from keil support stating:&lt;/p&gt;

&lt;p&gt;
&amp;quot;Strict ISO C99 mode is planned to be added in RealView 3.1. This
should be out sometime before midyear.&amp;quot;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding // style comment</title><link>https://community.arm.com/thread/98800?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2007 16:24:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ce67a5dd-b400-4292-95a4-e456e619bea4</guid><dc:creator>barry gordon</dc:creator><description>&lt;p&gt;&lt;p&gt;
I forgot to indicate the C/C++ tab in the original post. When
strict is selected error #29 &amp;quot;expected an expression&amp;quot; is output on a
line suct as&lt;/p&gt;

&lt;pre&gt;
  int myVar = 10;  // C99 style comment
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
then warnings and errors are output for other lines following. I&amp;#39;ve
seen other compilers that allow &amp;#39;// style comment&amp;quot; with &amp;#39;--strict&amp;#39;
enabled by providing an additional checkbox.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding // style comment</title><link>https://community.arm.com/thread/74694?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2007 15:56:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a428f7a0-15c9-4555-835d-380175d05ca4</guid><dc:creator>Kevin</dc:creator><description>&lt;p&gt;&lt;p&gt;
I think Barry is referring to:&lt;/p&gt;

&lt;p&gt;
Project -&amp;gt; Options for Target -&amp;gt; &amp;#39;C/C++&amp;#39; Tab &amp;#39;Stict ANSI C&amp;#39;
checkbox.&lt;/p&gt;

&lt;p&gt;
checking this Checkbox adds the &amp;#39;--strict&amp;#39; command to the compiler
command string at the bottom.&lt;/p&gt;

&lt;p&gt;
From the \Keil\ARM\Hlp\RV_cc.pdf manual, page 42 of the PDF (2-24
of the manual)&lt;/p&gt;

&lt;pre&gt;
Enables strict ISO mode (ISO/IEC 9899:1990 (E)) and the C++ Standard
(ISO/IEC 14882:1998 (E)). Diagnostic messages are returned when
nonstandard features are used, and features that conflict with ISO C or
C++ are disabled. This is compatible in both C and C++ mode.
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding // style comment</title><link>https://community.arm.com/thread/47538?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2007 13:14:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f0b058e1-cf1d-44bd-99b8-a04b66c64793</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Reinhard Keil said:&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;The RealView [ARM] Compiler is ANSI C99. All other Keil
Compilers are C90 with some language extensions.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
See: &lt;a href="http://www.keil.com/forum/docs/thread8500.asp"&gt;http://www.keil.com/forum/docs/thread8500.asp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
C51 certainly does allow the &amp;quot;//&amp;quot; comment style&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>