<div dir="ltr"><div style>OK. I misunderstood.</div><div style><br></div><div style>C does not allow function overloading, so same problem is not there.</div><div style>In C++, </div><div><br></div>// test.cpp<br><div class="gmail_extra">
<div class="gmail_quote">#include <stdio.h></div><div class="gmail_quote">void foo(bool) { printf("bool\n"); }<br></div><div class="gmail_quote">void foo(long) { printf("long\n"); }</div><div class="gmail_quote">
int main(int argc, char **argv)</div><div class="gmail_quote">{</div><div class="gmail_quote"><span class="" style="white-space:pre">     </span>foo(false);  // matches bool version</div><div class="gmail_quote"><span class="" style="white-space:pre">       </span>foo(true);   // matches bool version</div>
<div class="gmail_quote"><span class="" style="white-space:pre">      </span>foo(0);  // ambiguous</div><div class="gmail_quote"><span class="" style="white-space:pre">       </span>foo(1);  // ambiguous</div><div class="gmail_quote">
<span class="" style="white-space:pre">       </span>foo(2);  // ambiguous</div><div class="gmail_quote"><span class="" style="white-space:pre">      </span>return 0;</div><div class="gmail_quote">}</div><div class="gmail_quote"><br>
</div><div class="gmail_quote" style>The behavior is same with GCC 4.7.2 (using msys) and dmc.</div><div class="gmail_quote" style><br></div><div class="gmail_quote" style>Walter, now I changed my opinion. It seems not correct that being regarded bool type as one of the integer. </div>
<div class="gmail_quote" style>How about?</div><div class="gmail_quote" style><br></div><div class="gmail_quote" style>Kenji Hara</div><div class="gmail_quote"><br></div><div class="gmail_quote">2013/4/27 Minas Mina <span dir="ltr"><<a href="mailto:minas_mina1990@hotmail.co.uk" target="_blank">minas_mina1990@hotmail.co.uk</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On Saturday, 27 April 2013 at 11:41:30 UTC, kenji hara wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
First, I can guess that why Walter disagree *fixing* this problem.<br>
<br>
<a href="http://dlang.org/overview.html" target="_blank">http://dlang.org/overview.html</a><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Major Design Goals of D<br>
9. Where D code looks the same as C code, have it either behave the same<br>
</blockquote>
or issue an error.<br>
<br>
</blockquote>
<br></div>
C doesn't have a bool type, so how can D behave the same?<br>
</blockquote></div><br></div></div>