<?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: Missing C++ guards and missing closing braces in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/Missing-C-guards-and-missing-closing-braces/m-p/2064898#M19600</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your feedback, I will check this internally with the responsible team.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ana Sofia.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Mar 2025 18:35:54 GMT</pubDate>
    <dc:creator>sofiaurueta</dc:creator>
    <dc:date>2025-03-19T18:35:54Z</dc:date>
    <item>
      <title>Missing C++ guards and missing closing braces</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Missing-C-guards-and-missing-closing-braces/m-p/2063960#M19596</link>
      <description>&lt;P&gt;This is a combination bug report / update request. The JN5189DK SDK (2.6.15) seems to have been at least partially written with C++ support in mind, as there are C++ include guards in many headers. Many others are missing though, and some of those that include C++ guards erroneously miss the closing statement.&lt;/P&gt;&lt;P&gt;For example, in `wireless/framework/Common/dbg.h`, the guard opens at top of file and closes inside a conditional block (#if (!defined JENNIC_CHIP_FAMILY_JN518x)). The conditional else block has no closing statement&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#if defined __cplusplus
extern "C" {
#endif

#if (!defined JENNIC_CHIP_FAMILY_JN518x)
...
#if defined __cplusplus
};
#endif

#else /* JENNIC_CHIP_FAMILY is JN518x */
...
#endif&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are successfully building C++ applications, but the volume of changes required to add all of the guards makes migrating SDKs painful. Below is a non-exhaustive list of the errors and missing guards:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Missing closing braces:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- middleware/wireless/zigbee/ZigbeeCommon/Include/appZpsBeaconHandler.h&lt;BR /&gt;- middleware/wireless/framework/RNG/Interface/rnd_pub.h&lt;BR /&gt;- middleware/wireless/zigbee/ZCL/Clusters/OTA/Include/OTA.h&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;2. Completely missing guard&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- middleware/wireless/zigbee/ZigbeeCommon/Include/ZQueue.h&lt;BR /&gt;- middleware/wireless/zigbee/ZigbeeCommon/Include/ZTimer.h&lt;BR /&gt;- middleware/wireless/zigbee/ZPSAPL/Include/zps_apl_zdo.h&lt;BR /&gt;- middleware/wireless/zigbee/ZPSAPL/Include/zps_apl_af.h&lt;BR /&gt;- middleware/wireless/zigbee/ZPSAPL/Include/zps_apl_aib.h&lt;BR /&gt;- middleware/wireless/zigbee/ZPSAPL/Include/zps_apl_zdp.h&lt;BR /&gt;- middleware/wireless/zigbee/framework/PDUM/Include/pdum_apl.h&lt;BR /&gt;- middleware/wireless/zigbee/ZCL/Clusters/General/Include/Scenes.h&lt;BR /&gt;- middleware/wireless/zigbee/ZCL/Clusters/General/Include/OnOff.h&lt;BR /&gt;- middleware/wireless/zigbee/ZCL/Clusters/General/Include/Groups.h&lt;BR /&gt;- middleware/wireless/zigbee/ZCL/Clusters/General/Include/MultistateInputBasic.h&lt;BR /&gt;- middleware/wireless/zigbee/ZCL/Clusters/General/Include/Identify.h&lt;BR /&gt;- middleware/wireless/zigbee/ZCL/Clusters/General/Include/Basic.h&lt;BR /&gt;- middleware/wireless/zigbee/ZigbeeCommon/Include/portmacro_JN518x.h (probably also 517x, 516x)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Code generation and others&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- startup_JN5189.c: This file needs to be compiled as c++ to trigger the __libc_init_array call, but ResetISR2 needs C linkage in this case.&lt;/P&gt;&lt;P&gt;Additionally:&lt;BR /&gt;- pdum_gen.h - no include guard&lt;BR /&gt;- zps_gen.h - no include guard&lt;/P&gt;&lt;P&gt;There are likely many others. This is just those that we needed to modify to get our code compiling as C++.&lt;/P&gt;&lt;P&gt;Thanks for taking a look.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 16:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Missing-C-guards-and-missing-closing-braces/m-p/2063960#M19596</guid>
      <dc:creator>dstevens</dc:creator>
      <dc:date>2025-03-18T16:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Missing C++ guards and missing closing braces</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Missing-C-guards-and-missing-closing-braces/m-p/2064898#M19600</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your feedback, I will check this internally with the responsible team.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ana Sofia.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 18:35:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Missing-C-guards-and-missing-closing-braces/m-p/2064898#M19600</guid>
      <dc:creator>sofiaurueta</dc:creator>
      <dc:date>2025-03-19T18:35:54Z</dc:date>
    </item>
  </channel>
</rss>

