<?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>EC++ and priority keyword incompatibility</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/18355/ec-and-priority-keyword-incompatibility</link><description> Hello, 
 
Is it normal that EC++ won&amp;#39;t compile properly if a variable is called &amp;quot;priority&amp;quot; or &amp;quot;_priority&amp;quot;? 
 
Example: 
 
 
unsigned int priority = 1;
unsigned int _priority = 1;
 
 
Won&amp;#39;t compile. I don&amp;#39;t think that these words are either defined nor</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: EC++ and priority keyword incompatibility</title><link>https://community.arm.com/thread/138141?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2005 15:41:00 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9b7c2351-f48a-423b-b52c-08200ca2da54</guid><dc:creator>Georget Stephane</dc:creator><description>&lt;p&gt;Not quite.&lt;br /&gt;
&lt;br /&gt;
- &lt;b&gt;priority&lt;/b&gt;, &lt;b&gt;_priority&lt;/b&gt; and &lt;b&gt;__priority&lt;/b&gt; are EC++ keywords.&lt;br /&gt;
&lt;br /&gt;
- &lt;b&gt;_priority_&lt;/b&gt; is a C keyword, not EC++&lt;br /&gt;
&lt;br /&gt;
- &lt;b&gt;priority&lt;/b&gt; and &lt;b&gt;_priority&lt;/b&gt; &lt;i&gt;should not&lt;/i&gt; be EC++ tokens, for they are used elsewhere in Keil AR166 headers, and not documented in the EC++ manual.&lt;br /&gt;
&lt;br /&gt;
Let me get to the point then: it would be really cool if the next version of AR166 headers could compile successfully with EC++!&lt;br /&gt;
&lt;br /&gt;
Rgds,&lt;br /&gt;
&lt;br /&gt;
Steph-&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: EC++ and priority keyword incompatibility</title><link>https://community.arm.com/thread/134680?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2005 14:59:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e633c8c9-0acb-4348-aa1b-87ee417c6101</guid><dc:creator>Gp F</dc:creator><description>&lt;p&gt;Stephane,&lt;br /&gt;
&lt;br /&gt;
priority, _priority, _priority_ and __priority are keywords in the EC166 compiler.  They all mean the same and are used to pass &amp;#39;task&amp;#39; specific info to the C166 compiler. Please see the example below on how they are used.&lt;br /&gt;
&lt;br /&gt;
Peter&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
volatile int  c16, c17;
bit c16Bit;

void Task4 (void) __task 4*4 __priority 2*3 __using REG_RB2 {
  ++c16;
  --c17;
  c16Bit = 1;
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: EC++ and priority keyword incompatibility</title><link>https://community.arm.com/thread/123050?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2005 13:49:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:801ed74e-486e-41ad-9469-6a95c1c0f68c</guid><dc:creator>Georget Stephane</dc:creator><description>&lt;p&gt;Andy,&lt;br /&gt;
&lt;br /&gt;
Since the error is thrown by the EC++ parser, there is no &amp;quot;bug.ic&amp;quot; C listing generated.&lt;br /&gt;
The only file generated is the bug._ii file, which contains nothing but one line:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;bug._ii:&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;
&amp;quot;bug.cpp&amp;quot; HLARGE
&lt;/pre&gt;
&lt;br /&gt;
I am certain that &amp;quot;priority&amp;quot; is not defined elsewhere, for it is not defined in the EC++ target options, and I didn&amp;#39;t include any header. The bug.cpp file is only one line long, plus one &amp;lt;CR&amp;gt; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I tried a couple more things:&lt;br /&gt;
&lt;b&gt;bug.cpp&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;
#include  &amp;lt;stdio.h&amp;gt;
unsigned int priority = 1;
&lt;/pre&gt;
Returns the same error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;bug.cpp&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;
#include  &amp;lt;stdio.h&amp;gt;
#undef priority
unsigned int priority = 1;
&lt;/pre&gt;
Yields the same error...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rgds,&lt;br /&gt;
Steph-&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: EC++ and priority keyword incompatibility</title><link>https://community.arm.com/thread/111795?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2005 13:10:17 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:952b0045-8ca6-4487-8c36-c2f9fccac2f0</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;Well, you&amp;#39;re not the first to do it - but I think you are the first to admit the mistake!&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Anyhow, it certainly does look like EC++ is treating &amp;quot;priority&amp;quot; as some special keyword.&lt;br /&gt;
&lt;br /&gt;
Are you sure it isn&amp;#39;t being #defined somewhere in your project?&lt;br /&gt;
&lt;br /&gt;
Can EC++ give you a preprocessor listing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: EC++ and priority keyword incompatibility</title><link>https://community.arm.com/thread/97651?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2005 08:49:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:54bc3ed1-861b-409d-8106-01626169f74e</guid><dc:creator>Georget Stephane</dc:creator><description>&lt;p&gt;Andy,&lt;br /&gt;
&lt;br /&gt;
My mistake, I didn&amp;#39;t mean to call you by your last name :p&lt;br /&gt;
&lt;br /&gt;
Steph-&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: EC++ and priority keyword incompatibility</title><link>https://community.arm.com/thread/73624?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2005 08:45:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d99e6d81-eba6-4e5f-9dce-397d3d056258</guid><dc:creator>Georget Stephane</dc:creator><description>&lt;p&gt;Neil, I copied all I could here:&lt;br /&gt;
&lt;br /&gt;
Copy of bug.cpp&lt;br /&gt;
&lt;pre&gt;
unsigned int priority = 1;
&lt;/pre&gt;
&lt;br /&gt;
Copy of compiler output:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
compiling bug.cpp...
bug.cpp(1): error: expected an identifier
&lt;/pre&gt;
&lt;br /&gt;
Note that in that case I was just compiling that one particular file, not building the whole project.&lt;br /&gt;
&lt;br /&gt;
I checked that it compiles fine if I replace priority with priority_foo for instance.&lt;br /&gt;
&lt;br /&gt;
My toochain:&lt;br /&gt;
_________________________________________&lt;br /&gt;
&lt;br /&gt;
IDE-Version:&lt;br /&gt;
µVision3 V3.21&lt;br /&gt;
Copyright (c) Keil Elektronik GmbH / Keil Software, Inc. 1995 - 2005&lt;br /&gt;
&lt;br /&gt;
Tool Version Numbers:&lt;br /&gt;
Toolchain Path:    D:\Program Files\Keil\C166\BIN\&lt;br /&gt;
EC++ Compiler:      EC166.Exe       V1.09&lt;br /&gt;
C Compiler:         C166.Exe       V6.02&lt;br /&gt;
Assembler:          A166.Exe       V5.20&lt;br /&gt;
Linker/Locator:     L166.Exe       V5.21&lt;br /&gt;
Librarian:          LIB166.Exe       V4.26&lt;br /&gt;
Hex Converter:      OH166.Exe       V4.7a&lt;br /&gt;
CPU DLL:            S166.DLL       V2.49&lt;br /&gt;
Dialog DLL:         D167.DLL       V2.45&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you very much,&lt;br /&gt;
&lt;br /&gt;
Steph-&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: EC++ and priority keyword incompatibility</title><link>https://community.arm.com/thread/45029?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2005 17:39:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2b616623-e985-456d-9385-c55ad9d28b36</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;Why don&amp;#39;t you post the actual text of the error message?!&lt;br /&gt;
&lt;br /&gt;
Use cut-and-paste; don&amp;#39;t re-type it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>