<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is there a static (compile time) version of ASSERT()? in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Is-there-a-static-compile-time-version-of-ASSERT/m-p/661673#M8744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just stumbled across the answer: yes there is:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;_Static_assert(1==2, "whoa");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;...will cause the compilation to fail with a message of the form:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;In ../sources/assert_test.h:194:1: error: static assertion failed: "whoa"&lt;/P&gt;&lt;P class=""&gt;_Static_assert(1==2, "whoa");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;On the other hand,&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;_Static_assert(1==1, "whoa");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;... will compile without error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Feb 2017 21:18:03 GMT</pubDate>
    <dc:creator>robertpoor</dc:creator>
    <dc:date>2017-02-01T21:18:03Z</dc:date>
    <item>
      <title>Is there a static (compile time) version of ASSERT()?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Is-there-a-static-compile-time-version-of-ASSERT/m-p/661672#M8743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a compile-time form of ASSERT() available in KDS? &amp;nbsp;It would be handy when checking on size of packed bit arrays, or the address of system registers, etc.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a "polyfill" version of STATIC_ASSERT() from&amp;nbsp;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.pixelbeat.org%2Fprogramming%2Fgcc%2Fstatic_assert.html" rel="nofollow" target="_blank"&gt;Compile time assertions in C&lt;/A&gt;&amp;nbsp;, but it would be great if there was a natively supported version instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 21:04:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Is-there-a-static-compile-time-version-of-ASSERT/m-p/661672#M8743</guid>
      <dc:creator>robertpoor</dc:creator>
      <dc:date>2017-02-01T21:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a static (compile time) version of ASSERT()?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Is-there-a-static-compile-time-version-of-ASSERT/m-p/661673#M8744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just stumbled across the answer: yes there is:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;_Static_assert(1==2, "whoa");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;...will cause the compilation to fail with a message of the form:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;In ../sources/assert_test.h:194:1: error: static assertion failed: "whoa"&lt;/P&gt;&lt;P class=""&gt;_Static_assert(1==2, "whoa");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;On the other hand,&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;_Static_assert(1==1, "whoa");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;... will compile without error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 21:18:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Is-there-a-static-compile-time-version-of-ASSERT/m-p/661673#M8744</guid>
      <dc:creator>robertpoor</dc:creator>
      <dc:date>2017-02-01T21:18:03Z</dc:date>
    </item>
  </channel>
</rss>

