<?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>Two question in one, typedef union {} and funtion of integer</title><link>https://community.arm.com/developer/ip-products/processors/f/cortex-m-forum/48292/two-question-in-one-typedef-union-and-funtion-of-integer</link><description> Hello, 
 Being here just 30 seconds. 
 I have two questions, where the first one is about using a typdef union{} in other files, see my code here 
 
 Compiler gives an error telling that fc4 undefined, see it 
 error: #20: identifier &amp;quot;fc4&amp;quot; is undefined</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Two question in one, typedef union {} and funtion of integer</title><link>https://community.arm.com/thread/169192?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2020 10:05:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:31cde22e-713c-4520-b98b-ffd98be31f99</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;It&amp;#39;s best to stick to one question per thread - otherwise replies to the different questions get muddled up.&lt;/p&gt;
&lt;p&gt;As&amp;nbsp;&lt;a href="/members/sciopta" class="internal-link view-user-profile"&gt;42Bastian Schick&lt;/a&gt;&amp;nbsp;says, this is standard &amp;#39;C&amp;#39; stuff - nothing specifically to do with ARM or Cortex-M&lt;/p&gt;
&lt;p&gt;Here are some standard &amp;#39;C&amp;#39; reference &amp;amp; learning materials for you:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/" rel="noopener noreferrer" target="_blank"&gt;https://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="70872" url="~/developer/ip-products/processors/f/cortex-m-forum/48292/two-question-in-one-typedef-union-and-funtion-of-integer"]&lt;p&gt;Compiler gives an error telling that fc4 undefined, see it&amp;nbsp;&lt;/p&gt;
&lt;p&gt;error:&amp;nbsp; #20: identifier &amp;quot;fc4&amp;quot; is undefined&lt;/p&gt;[/quote]
&lt;p&gt;So where, exactly, was that error reported?&lt;/p&gt;
[quote userid="70872" url="~/developer/ip-products/processors/f/cortex-m-forum/48292/two-question-in-one-typedef-union-and-funtion-of-integer"]&lt;p&gt;&lt;/p&gt;
&lt;pre class="ui-code" style="display:none;"&gt;
// a.c
fc4 vfc4a;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
[/quote]
&lt;p&gt;So your &lt;strong&gt;a.c&lt;/strong&gt; file has not #included the &lt;strong&gt;a.h&lt;/strong&gt; header ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two question in one, typedef union {} and funtion of integer</title><link>https://community.arm.com/thread/169185?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2020 07:06:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:702d2f85-3358-4216-9abb-39437a5afc30</guid><dc:creator>42Bastian Schick</dc:creator><description>&lt;p&gt;This is a Cortex-M forum, for Cortex-M questions. Not a C forum. So this might be the only answer you get.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>