<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>The -pedantic compiler flag.</title>
		<link>http://www.allegro.cc/forums/view/609871</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 31 Mar 2012 15:00:31 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Man I couldn&#39;t stop laughing when I activated the <span class="source-code"><span class="k3">-</span>pedantic</span> flag in MinGW and it gave me an error in the Allegro library, and I was like uh? what could it be? And when I saw the error...</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">typedef</span> <span class="k1">enum</span> <a href="http://www.allegro.cc/manual/ALLEGRO_FILE_MODE"><span class="a">ALLEGRO_FILE_MODE</span></a>
<span class="k2">{</span>
   ALLEGRO_FILEMODE_READ    <span class="k3">=</span> <span class="n">1</span>,
   ALLEGRO_FILEMODE_WRITE   <span class="k3">=</span> <span class="n">1</span> <span class="k3">&lt;</span><span class="k3">&lt;</span> <span class="n">1</span>,
   ALLEGRO_FILEMODE_EXECUTE <span class="k3">=</span> <span class="n">1</span> <span class="k3">&lt;</span><span class="k3">&lt;</span> <span class="n">2</span>,
   ALLEGRO_FILEMODE_HIDDEN  <span class="k3">=</span> <span class="n">1</span> <span class="k3">&lt;</span><span class="k3">&lt;</span> <span class="n">3</span>,
   ALLEGRO_FILEMODE_ISFILE  <span class="k3">=</span> <span class="n">1</span> <span class="k3">&lt;</span><span class="k3">&lt;</span> <span class="n">4</span>,
   ALLEGRO_FILEMODE_ISDIR   <span class="k3">=</span> <span class="n">1</span> <span class="k3">&lt;</span><span class="k3">&lt;</span> <span class="n">5</span>, <span class="c">// &lt; -- This?... My god...</span>
<span class="k2">}</span> <a href="http://www.allegro.cc/manual/ALLEGRO_FILE_MODE"><span class="a">ALLEGRO_FILE_MODE</span></a><span class="k2">;</span>
</pre></div></div><p>
</p><pre class="terminal">4.6.2\include\allegro5\fshook.h|52|error: comma at end of enumerator list [-pedantic]|</pre><p>

Hahahahaha <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" /> Why the compiler is so strict sometimes and sometimes is not?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Fri, 30 Mar 2012 00:08:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>-pedantic really means what it says it means. It&#39;s there to be pedantic. Now add -ansi to the argument list and see how much it screams.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Fri, 30 Mar 2012 00:14:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Uh? it didn&#39;t gave me any errors with <span class="source-code"><span class="k3">-</span>ansi</span> <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /> are you pulling my leg?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Fri, 30 Mar 2012 00:29:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/609871/951121#target">AMCerasoli</a> said:</div><div class="quote"><p>Uh? it didn&#39;t gave me any errors with -ansi  are you pulling my leg?</p></div></div><p>That probably just means we&#39;ve done a decent job with Allegro <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /></p><p>-ansi and -pedantic together usually lead to a lot of warnings and errors for projects. You are adding -Wall -Wextra right?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Fri, 30 Mar 2012 00:36:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/609871/951122#target">Thomas Fjellstrom</a> said:</div><div class="quote"><p> You are adding -Wall -Wextra right?</p></div></div><p>No I had only <span class="source-code"><span class="k3">-</span>Wall</span>, I have just added <span class="source-code"><span class="k3">-</span>Wextra</span> but it&#39;s the same. Man why my compiler doesn&#39;t give me any errors? I want compilers errors. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>When I made the trivia game I didn&#39;t use none of this, and even not using them I had some warnings about variables being initialized first in the initialization list and problems with <span class="source-code"><span class="k1">char</span></span> and <span class="source-code"><span class="k1">int</span></span> being compared, but this time I want to let it everything crystal clear, since the project is going to be a lot bigger.</p><p>My next videogame...</p><h2>Emancipation: A World Without Peace</h2><p> </p><p><div class="media-player youtube"><div style="margin: 1em 2em; background: url(/images/movie.png); width: 180px; height: 100px; text-align: center;"><a href="http://www.allegro.cc//www.youtube.com/watch?v=6LYooGamYxk" target="_blank"><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/object/f/d/fd7971b0d8ed4c443cd27c1fa2a608ae.jpg" border="0" alt="video" title="Click to play video" /></a></div></div>	</p><p>Yay \o/
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Fri, 30 Mar 2012 01:00:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/609871/951125#target">AMCerasoli</a> said:</div><div class="quote"><p>No I had only -Wall, I have just added -Wextra but it&#39;s the same. Man why my compiler doesn&#39;t give me any errors? I want compilers errors. </p></div></div><p>Write worse code.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Fri, 30 Mar 2012 01:02:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Fixed, thanks.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Fri, 30 Mar 2012 04:01:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well I just put it here to let you know... There is another comma out there! be careful you can blow out your PC!</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">enum</span> <a href="http://www.allegro.cc/manual/ALLEGRO_MIXER_QUALITY"><span class="a">ALLEGRO_MIXER_QUALITY</span></a>
<span class="k2">{</span>
   ALLEGRO_MIXER_QUALITY_POINT   <span class="k3">=</span> <span class="n">0x110</span>,
   ALLEGRO_MIXER_QUALITY_LINEAR  <span class="k3">=</span> <span class="n">0x111</span>,
<span class="k2">}</span><span class="k2">;</span>
</pre></div></div><p>

Allegro_audio.h</p><p>I&#39;m finding this while including the headers in my project... hoHOho.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Fri, 30 Mar 2012 18:56:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>From the <a href="http://zlib.net/zlib_faq.html#faq35">zlib FAQ</a> (q 35)</p><p>&quot;Q: I get this or that compiler or source-code scanner warning when I crank it up to maximally-pedantic. Can&#39;t you guys write proper code?</p><p>A: Many years ago, we gave up attempting to avoid warnings on every compiler in the universe. It just got to be a waste of time, and some compilers were downright silly. So now, we simply make sure that the code always works.&quot;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Fri, 30 Mar 2012 19:00:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>They can say whatever they want, but if I find another comma out of place I will stop using Allegro, and that is my last word... <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="c">//Arthurs Kalliokoski's code</span>
<span class="number">  2</span>
<span class="number">  3</span><span class="p">#include &lt;lol.h&gt;</span>
<span class="number">  4</span>
<span class="number">  5</span><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span><span class="k2">{</span>
<span class="number">  6</span>   <span class="k1">enum</span> Arthur_pepsi_packs<span class="k2">{</span>
<span class="number">  7</span>      MONDAY    <span class="k3">=</span> <span class="n">1000</span>,
<span class="number">  8</span>      TUESDAY   <span class="k3">=</span> <span class="n">500</span>,
<span class="number">  9</span>      WEDNESDAY <span class="k3">=</span> <span class="n">000</span>,
<span class="number"> 10</span>      THURSDAY  <span class="k3">=</span> <span class="n">1000</span>,
<span class="number"> 11</span>      FRIDAY    <span class="k3">=</span> <span class="n">1500</span>,
<span class="number"> 12</span>      SATURDAY  <span class="k3">=</span> <span class="n">500</span>,
<span class="number"> 13</span>      SUNDAY    <span class="k3">=</span> <span class="n">000</span>,
<span class="number"> 14</span>                     ,
<span class="number"> 15</span>                     ,
<span class="number"> 16</span>   <span class="k2">}</span>
<span class="number"> 17</span>
<span class="number"> 18</span>   <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span>
<span class="number"> 19</span><span class="k2">}</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Fri, 30 Mar 2012 19:12:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There should be a for(;;) loop in there somewhere, and Wednesday&#39;s and Sunday&#39;s values are totally unacceptable. <img src="http://www.allegro.cc/forums/smileys/angry.gif" alt="&gt;:(" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Fri, 30 Mar 2012 19:15:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/609871/951196#target">AMCerasoli</a> said:</div><div class="quote"><p>
if I find another comma out of place I will stop using Allegro
</p></div></div><p>

There were two more.</p><p>Anyway, it&#39;s worth fixing these things in public headers because you never know where they will be included.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Sat, 31 Mar 2012 03:48:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>For consistency you need to keep all the numbers the same length:
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="c">//Arthurs Kalliokoski's code</span>
<span class="number">  2</span>
<span class="number">  3</span><span class="p">#include &lt;lol.h&gt;</span>
<span class="number">  4</span>
<span class="number">  5</span><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span><span class="k2">{</span>
<span class="number">  6</span>   <span class="k1">enum</span> Arthur_pepsi_packs<span class="k2">{</span>
<span class="number">  7</span>      MONDAY    <span class="k3">=</span> <span class="n">1000</span>,
<span class="number">  8</span>      TUESDAY   <span class="k3">=</span> <span class="n">0500</span>,
<span class="number">  9</span>      WEDNESDAY <span class="k3">=</span> <span class="n">0000</span>,
<span class="number"> 10</span>      THURSDAY  <span class="k3">=</span> <span class="n">1000</span>,
<span class="number"> 11</span>      FRIDAY    <span class="k3">=</span> <span class="n">1500</span>,
<span class="number"> 12</span>      SATURDAY  <span class="k3">=</span> <span class="n">0500</span>,
<span class="number"> 13</span>      SUNDAY    <span class="k3">=</span> <span class="n">0000</span>,
<span class="number"> 14</span>                      ,
<span class="number"> 15</span>                      ,
<span class="number"> 16</span>   <span class="k2">}</span>
<span class="number"> 17</span>
<span class="number"> 18</span>   <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span><span class="k2">;</span>
<span class="number"> 19</span><span class="k2">}</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bruce Perry)</author>
		<pubDate>Sat, 31 Mar 2012 13:52:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Are you forgetting that starting a number with a zero (but no x) means the compiler interprets it as octal?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Sat, 31 Mar 2012 14:47:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>No, that&#39;s exactly why I &#39;corrected&#39; the code <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bruce Perry)</author>
		<pubDate>Sat, 31 Mar 2012 15:00:31 +0000</pubDate>
	</item>
</rss>
