<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/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/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Attempted to compile SDK 17 with the c ++ compiler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72957/attempted-to-compile-sdk-17-with-the-c-compiler</link><description>Hi everyone, I have some problem with SDK 17, when I try compile it by C++ compiler. Compiler detected many errors, for example: 
 
 nrf_fprintf,c problem with va_lista 
 
 va_list should never be initialized. It&amp;#39;s standard in C and C++ that it is just</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 20 Mar 2021 14:44:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72957/attempted-to-compile-sdk-17-with-the-c-compiler" /><item><title>RE: Attempted to compile SDK 17 with the c ++ compiler</title><link>https://devzone.nordicsemi.com/thread/301053?ContentTypeID=1</link><pubDate>Sat, 20 Mar 2021 14:44:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f394d110-875a-4d82-bfe3-41ddea7a96e8</guid><dc:creator>GrzegorzKonopko</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think it some misunderstand in general.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/krystian_5f00_"&gt;Krystian_&lt;/a&gt; point some constructions what are at least doubt (but be honest possibly bug or for sure bug) not only related to C++ but also C.&lt;/p&gt;
&lt;p&gt;1. initialize instance of &lt;span style="font-size:inherit;"&gt;va_list by 0?? it is not related to C++&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;2. macro VERIFY_SUCCESS return value in context of function void??&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;3. I know it is not stack-overflow when we may ask general programming question but could you refer to key word &amp;quot;const&amp;quot; in construct quoted below? is it valid according any C standard?&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;In my opinion it us quite odd/uncommon so if you point me paragraph in Ansi C standard what allow on it, I will appreciate. If not why nordic use such construct?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt; typedef struct&lt;br /&gt;{&lt;br /&gt;&amp;hellip;&amp;hellip;.&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;} const nrf_sdh_req_observer_t&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;I think we may refactor this topic into kind of source code quality if you prefer in order to address some issue into nordic source code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Best Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;/Greg&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Attempted to compile SDK 17 with the c ++ compiler</title><link>https://devzone.nordicsemi.com/thread/300634?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 10:30:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c67d395-4fd8-4bd8-af4e-33729a0ec071</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;There are plenty of previous posts on this&lt;/p&gt;
&lt;p&gt;Nordic do not claim that the SDK is C++&lt;/p&gt;
&lt;p&gt;You can compile the SDK as C, and link to C++ code ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>