<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>C11 | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/c11/feed/" rel="self" type="application/rss+xml" />
	<link>https://learncgames.com</link>
	<description>A blog about C, programming games and my ebook(s).</description>
	<lastBuildDate>Fri, 06 Nov 2020 20:19:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://learncgames.com/wp-content/uploads/2020/03/cropped-favicon-32x32.png</url>
	<title>C11 | Learn C Games Programming Blog</title>
	<link>https://learncgames.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">181446779</site>	<item>
		<title>Can you compile this?</title>
		<link>https://learncgames.com/can-you-compile-this/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=can-you-compile-this</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sat, 07 Nov 2020 00:00:03 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[C11]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=1733</guid>

					<description><![CDATA[<p>It&#8217;s just a little bit of C. I compiled it with these three compilers. MS VC (16.7.7 on Windows) gcc, and clang on Ubuntu 20.04 LTS. MS VC picked up the _Noreturn and complained, gcc 9.33 compiled it with not a whisper while clang 10.0.0 warned about void in the main function but compiled it [&#8230;]</p>
The post <a href="https://learncgames.com/can-you-compile-this/">Can you compile this?</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:402,&quot;href&quot;:&quot;https:\/\/pixabay.com\/users\/publicdomainpictures-14\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=21849&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260201001249\/https:\/\/pixabay.com\/users\/publicdomainpictures-14\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 14:43:08&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-11 00:57:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-23 00:07:14&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-27 11:04:46&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-04 22:26:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-10 14:16:22&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-17 18:47:42&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-27 21:41:48&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-07 19:21:43&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-13 06:00:58&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-18 18:06:39&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-22 02:34:42&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-26 01:54:05&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-26 01:54:05&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:403,&quot;href&quot;:&quot;https:\/\/pixabay.com\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=21849&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260205102120\/https:\/\/pixabay.com\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 14:43:11&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-11 00:57:49&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-23 00:07:13&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-27 11:04:45&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-04 22:26:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-10 14:16:21&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-17 18:47:38&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-27 21:41:48&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-07 19:21:43&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-13 06:00:51&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-18 18:06:43&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-22 02:34:41&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-26 01:54:03&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-26 01:54:03&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:404,&quot;href&quot;:&quot;https:\/\/devblogs.microsoft.com\/cppblog\/c11-and-c17-standard-support-arriving-in-msvc&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251212150650\/https:\/\/devblogs.microsoft.com\/cppblog\/c11-and-c17-standard-support-arriving-in-msvc\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 14:43:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 22:18:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-15 11:07:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-18 18:46:19&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-23 00:07:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 04:02:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-04 22:26:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-08 08:26:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-11 09:12:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 09:33:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-17 16:37:32&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-20 19:32:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-27 21:41:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 05:56:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-07 19:21:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-12 12:53:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-16 05:32:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-20 04:42:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-24 03:34:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-27 14:30:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-30 21:50:52&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-30 21:50:52&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'></div>
<figure id="attachment_1734" aria-describedby="caption-attachment-1734" style="width: 300px" class="wp-caption alignleft"><img fetchpriority="high" decoding="async" class="size-medium wp-image-1734" src="https://learncgames.com/wp-content/uploads/2020/11/books-21849_640-300x200.jpg" alt="No return" width="300" height="200" srcset="https://learncgames.com/wp-content/uploads/2020/11/books-21849_640-300x200.jpg 300w, https://learncgames.com/wp-content/uploads/2020/11/books-21849_640.jpg 640w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-1734" class="wp-caption-text">Image by <a href="https://pixabay.com/users/publicdomainpictures-14/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=21849">PublicDomainPictures</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=21849">Pixabay</a></figcaption></figure>
<p>It&#8217;s just a little bit of C. I compiled it with these three compilers. MS VC (<em>16.7.7 on Windows</em>) gcc, and clang on Ubuntu 20.04 LTS. MS VC picked up the _Noreturn and complained, gcc 9.33 compiled it with not a whisper while clang 10.0.0 warned about void in the main function but compiled it anyway.</p>
<p>Both the clang and gcc compiled files ran and as you&#8217;d expect sat in an infinite loop until I control-c&#8217;d it.</p>
<p>However soon MS VC will compile it. According to<a title="Link to Blog about MS VC support for C11" href="https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/" target="_blank" rel="nofollow noopener noreferrer"> this blog entry,</a> MSVC from 16.8 preview 3 supports C11 and the _Noreturn feature (<em>which tells the compiler that the function never returns</em>) will be ok. Both gcc and clang support C11 so no problems.</p>
<pre><code class="language-c" data-line="">#include &lt;stdio.h&gt;

_Noreturn void nrloop() {
	while (1) {
		;
	}
}

void main() {
	nrloop();
}</code></pre>
<p>&nbsp;</p>
<p>When would I use such a function, you might ask. IO can&#8217;t see me using it much unless I wnt to write a background thread function that just runs forever. I have indeed written such a function recently but it was in Delphi not C. Another use is a function that exits perhaps vi a jmp. It also lets the compiler know so it can optimize return code away.</p>
<p>As I said, I don&#8217;t think I&#8217;ll be using it much if at all.</p>The post <a href="https://learncgames.com/can-you-compile-this/">Can you compile this?</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1733</post-id>	</item>
		<item>
		<title>C11 and C17 support in MSVC</title>
		<link>https://learncgames.com/c11-and-c17-support-in-msvc/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=c11-and-c17-support-in-msvc</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Fri, 18 Sep 2020 23:00:23 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[C11]]></category>
		<category><![CDATA[c17]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=1415</guid>

					<description><![CDATA[<p>&#160; Microsoft have announced that they will be supporting both C11 and C17 in Visual Studio 2019 version 16.8 Preview 3. All the required features but not optional features and not VLAs (Variable Length Arrays) which is considered unsafe. One of the complaints has been that Microsoft always prioritised C++ over C for many years. [&#8230;]</p>
The post <a href="https://learncgames.com/c11-and-c17-support-in-msvc/">C11 and C17 support in MSVC</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:516,&quot;href&quot;:&quot;https:\/\/pixabay.com\/users\/Peggy_Marco-1553824\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1015531&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251207210515\/https:\/\/pixabay.com\/users\/peggy_marco-1553824\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 15:36:07&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-10 22:18:10&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-15 11:07:39&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-18 18:46:15&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-23 00:07:13&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-27 04:02:04&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-04 22:26:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-10 14:16:22&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-14 00:27:01&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-17 16:37:31&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-20 19:32:44&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-03 05:56:30&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-10 11:59:22&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-17 13:39:51&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-21 20:48:16&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-26 13:15:35&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-05-01 23:52:29&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-01 23:52:29&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:517,&quot;href&quot;:&quot;https:\/\/pixabay.com\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1015531&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260205102120\/https:\/\/pixabay.com\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 15:36:09&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-10 22:18:10&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-15 11:07:38&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-18 18:46:15&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-23 00:07:13&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-27 04:02:08&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-04 22:26:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-10 14:16:21&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-14 00:27:01&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-17 16:37:32&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-20 19:32:45&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-03 05:56:30&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-10 11:59:22&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-17 13:39:53&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-21 20:48:17&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-26 13:15:33&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-05-02 21:16:06&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-02 21:16:06&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:404,&quot;href&quot;:&quot;https:\/\/devblogs.microsoft.com\/cppblog\/c11-and-c17-standard-support-arriving-in-msvc&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251212150650\/https:\/\/devblogs.microsoft.com\/cppblog\/c11-and-c17-standard-support-arriving-in-msvc\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 14:43:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 22:18:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-15 11:07:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-18 18:46:19&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-23 00:07:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 04:02:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-04 22:26:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-08 08:26:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-11 09:12:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 09:33:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-17 16:37:32&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-20 19:32:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-27 21:41:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 05:56:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-07 19:21:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-12 12:53:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-16 05:32:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-20 04:42:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-24 03:34:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-27 14:30:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-30 21:50:52&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-30 21:50:52&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'></div>
<p>&nbsp;</p>
<figure id="attachment_1416" aria-describedby="caption-attachment-1416" style="width: 300px" class="wp-caption alignleft"><img decoding="async" class="size-medium wp-image-1416" src="https://learncgames.com/wp-content/uploads/2020/09/c-1015531_640-300x300.jpg" alt="The letter C" width="300" height="300" srcset="https://learncgames.com/wp-content/uploads/2020/09/c-1015531_640-300x300.jpg 300w, https://learncgames.com/wp-content/uploads/2020/09/c-1015531_640-150x150.jpg 150w, https://learncgames.com/wp-content/uploads/2020/09/c-1015531_640.jpg 640w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-1416" class="wp-caption-text">Image by <a href="https://pixabay.com/users/Peggy_Marco-1553824/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1015531">Peggy und Marco Lachmann-Anke</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1015531">Pixabay</a></figcaption></figure>
<p><a title="Link to a Microsoft dev blog entry" href="https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/" target="_blank" rel="nofollow noopener noreferrer">Microsoft have announced</a> that they will be supporting both C11 and C17 in Visual Studio 2019 version 16.8 Preview 3. All the required features but not optional features and not VLAs (Variable Length Arrays) which is considered unsafe.</p>
<p>One of the complaints has been that Microsoft always prioritised C++ over C for many years. C was supported inasmuch as it was needed for C++. Until fairly recently C++ was a superset of C and you could compile C program as C++. Just change the extension to .cpp.</p>
<p>That said, I will probably continue to write C code as C99 for now and take a look at the C11/C17 features such as restrict, stdnoreturn and so on.  Note C17 is considered a bit of a bug fix for C11.</p>The post <a href="https://learncgames.com/c11-and-c17-support-in-msvc/">C11 and C17 support in MSVC</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1415</post-id>	</item>
		<item>
		<title>I&#8217;m considering switching to C11</title>
		<link>https://learncgames.com/im-considering-switching-to-c11/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=im-considering-switching-to-c11</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Mon, 16 Mar 2020 00:00:45 +0000</pubDate>
				<category><![CDATA[Clang]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[C11]]></category>
		<category><![CDATA[C99]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=134</guid>

					<description><![CDATA[<p>All C code I write in the books is currently to the C99 standard. All the compilers involved (Visual C++ on Windows and Clang on Ubuntu) support C99 but C11 support seems restricted to GCC and Clang. Microsoft has traditionally supported C++ but their C support seems a bit grudging; realistically they don&#8217;t prioritise it [&#8230;]</p>
The post <a href="https://learncgames.com/im-considering-switching-to-c11/">I’m considering switching to C11</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:472,&quot;href&quot;:&quot;https:\/\/pixabay.com\/users\/geralt-9301\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=942487&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260128125116\/https:\/\/pixabay.com\/users\/geralt-9301\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 15:15:42&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-12 02:14:17&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-22 09:31:10&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-04 22:26:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-10 14:16:21&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-15 04:58:11&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-25 06:58:02&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-30 05:47:12&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-05 04:25:33&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-10 01:48:01&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-17 13:39:47&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-21 23:08:37&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-25 11:52:59&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-28 15:43:40&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-05-02 00:36:08&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-02 00:36:08&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:473,&quot;href&quot;:&quot;https:\/\/pixabay.com\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=942487&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260205102120\/https:\/\/pixabay.com\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 15:15:44&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-12 02:14:17&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-22 09:31:09&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-04 22:26:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-10 14:16:21&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-15 04:58:05&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-25 06:58:02&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-30 05:47:13&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-05 04:25:31&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-10 01:48:00&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-17 13:39:38&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-21 23:08:41&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-25 11:53:01&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-28 15:43:39&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-05-02 00:36:08&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-02 00:36:08&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:817,&quot;href&quot;:&quot;https:\/\/en.wikichip.org\/wiki\/c\/c11&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20210506225725\/https:\/\/en.wikichip.org\/wiki\/c\/c11&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 19:36:02&quot;,&quot;http_code&quot;:520},{&quot;date&quot;:&quot;2026-02-11 21:41:38&quot;,&quot;http_code&quot;:520},{&quot;date&quot;:&quot;2026-02-23 00:07:14&quot;,&quot;http_code&quot;:520},{&quot;date&quot;:&quot;2026-03-04 22:26:50&quot;,&quot;http_code&quot;:520},{&quot;date&quot;:&quot;2026-03-10 14:16:22&quot;,&quot;http_code&quot;:520},{&quot;date&quot;:&quot;2026-03-15 04:58:08&quot;,&quot;http_code&quot;:520},{&quot;date&quot;:&quot;2026-03-25 06:58:02&quot;,&quot;http_code&quot;:520},{&quot;date&quot;:&quot;2026-03-30 05:47:12&quot;,&quot;http_code&quot;:520},{&quot;date&quot;:&quot;2026-04-07 11:32:05&quot;,&quot;http_code&quot;:520},{&quot;date&quot;:&quot;2026-04-11 20:05:37&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-21 23:08:45&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-25 11:52:50&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-30 06:26:01&quot;,&quot;http_code&quot;:503}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-30 06:26:01&quot;,&quot;http_code&quot;:503},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:818,&quot;href&quot;:&quot;https:\/\/smartbear.com\/blog\/test-and-monitor\/c11-a-new-c-standard-aiming-at-safer-programming&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;https:\/\/smartbear.com\/blog\/test-and-monitor\/c11-a-new-c-standard-aiming-at-safer-programming\/&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]'></div>
<figure id="attachment_138" aria-describedby="caption-attachment-138" style="width: 300px" class="wp-caption alignleft"><img decoding="async" class="size-medium wp-image-138" src="https://learncgames.com/wp-content/uploads/2020/03/programming-942487_1280-300x212.jpg" alt="Programming image" width="300" height="212" srcset="https://learncgames.com/wp-content/uploads/2020/03/programming-942487_1280-300x212.jpg 300w, https://learncgames.com/wp-content/uploads/2020/03/programming-942487_1280-1024x723.jpg 1024w, https://learncgames.com/wp-content/uploads/2020/03/programming-942487_1280-768x542.jpg 768w, https://learncgames.com/wp-content/uploads/2020/03/programming-942487_1280.jpg 1280w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-138" class="wp-caption-text">Image by <a href="https://pixabay.com/users/geralt-9301/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=942487">Gerd Altmann</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=942487">Pixabay</a></figcaption></figure>
<p>All C code I write in the books is currently to the C99 standard. All the compilers involved (Visual C++ on Windows and Clang on Ubuntu) support C99 but C11 support seems restricted to GCC and Clang.</p>
<p>Microsoft has traditionally supported C++ but their C support seems a bit grudging; realistically they don&#8217;t prioritise it which I can understand.</p>
<p>Given though that I&#8217;m not going to republish my first e-book for a while (I&#8217;d like to add a WebAssembly chapter or two first), I&#8217;m going to investigate whether it&#8217;s worth switching to C11 for the 2nd book. From what I&#8217;ve read all it needs is a flag to tll it to compile to C11 standards. This is for Clang.</p>
<p>-std=c11</p>
<p>But the other question is <strong>what will I gain by doing this</strong> and I can&#8217;t actually see there&#8217;s that much benefit.. I don&#8217;t need Unicode, I don&#8217;t think alignment will really make much difference. You can read about the C11 changes on <a href="https://en.wikichip.org/wiki/c/c11" target="_blank" rel="noopener noreferrer">WikiChip.</a></p>
<p>So I&#8217;ve made the decision. I&#8217;ll stick with C99 for now. But for an alternative view, I recommend <a href="https://smartbear.com/blog/test-and-monitor/c11-a-new-c-standard-aiming-at-safer-programming/" target="_blank" rel="noopener noreferrer">Danny Kalev&#8217;s 2012 article on C11</a>.</p>
<p>&nbsp;</p>The post <a href="https://learncgames.com/im-considering-switching-to-c11/">I’m considering switching to C11</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">134</post-id>	</item>
	</channel>
</rss>
