title: Code compiles in ideone but not with gcc
body: <p>I wrote the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main()
  {
      int v()
      return 0;
  }
  </code></pre>
  
  <p>I ran it in <a href="http://ideone.com/LOedLL" rel="nofollow">ideone</a>, and it compiled successfully. I have the same code in file <code>test1.cpp</code> on my computer, I ran <code>g++ test1.cpp</code> and I got the following error: </p>
  
  <pre><code>./test1.cpp: In function ‘int main()’:
  ./test1.cpp:7:2: error: a function-definition is not allowed here before ‘return’
  </code></pre>
  
  <p>Why dose this happen? is this a bug?
  I'm using linux mint, gcc version 4.7. </p>