<p>In C the following horror is valid:</p>

<pre><code>myFunc()
{
  return 42;  // return type defaults to int.
}
</code></pre>

<p>But, what about in C++? I can't find a reference to it either way...</p>

<p>My compiler (Codegear C++Builder 2007) currently accepts it without warning, but I've had comments that this <strong><em>is</em></strong> an error in C++.</p>

It's
ill-formed
in C++. Meaning that it doesn't compile with a standard conforming compiler. Paragraph
7.1.5/4
in Annex C of the Standard explains the change "Banning implicit int".