title: Program without semicolon compiles fine in C not in C++ why?
body: <p>I am using Orwell Dev C++ IDE. Recently I tested following simple program in which I forgot to put semicolon (<code>;</code>) but still it compiles fine in C but not in C++. Why? What is the reason?</p>
  
  <pre><code>// C program compiles &amp; runs fine, even ; missing at end of struct
  #include &lt;stdio.h&gt;
  struct test
  { int a,b};     // missing semicolon
  int main()
  {
      struct test d={3,6};
      printf("%d",d.a);
      return 0;
  }
  </code></pre>
  
  <blockquote>
    <p>[Warning] no semicolon at end of struct or union [enabled by default]</p>
  </blockquote>
  
  <pre><code>// Following is compilation error in C++
  #include &lt;stdio.h&gt;
  struct test
  { int a,b};     // missing semicolon
  int main()
  {
      struct test d={3,6};
      printf("%d",d.a);
      return 0;
  }
  </code></pre>
  
  <blockquote>
    <p>[Error] expected ';' at end of member declaration</p>
  </blockquote>
  
  <p>I also tried same C program in codeblocks 13.12 IDE but it shows following error message</p>
  
  <blockquote>
    <p>error: no semicolon at end of struct or union.</p>
  </blockquote>
  
  <p>Why different error messages given by different implementations?</p>