<?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>Placing struct functions on specific regions</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/30772/placing-struct-functions-on-specific-regions</link><description> 
What is the proper syntax to place struct functions in specific
regions? Using something like the example below appears to ignore the
#pragma statement, e.g. the object code for foo::bar() is not placed
in section &amp;quot;sram2&amp;quot;. Using #pragma section on a</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Placing struct functions on specific regions</title><link>https://community.arm.com/thread/62244?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2013 16:14:17 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4dc922cb-7f6e-4c1f-9a08-39df02d59849</guid><dc:creator>J Alvarez</dc:creator><description>&lt;p&gt;&lt;p&gt;
Forgot to use the pre tags in the example. It should look as
follows:&lt;/p&gt;

&lt;pre&gt;
#pragma arm section code = &amp;quot;sram2&amp;quot;
struct foo
{
    int bar(int x)
    {
        int ret;
        // Some logic
        return ret;
    }
}
#pragma arm section code
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>