Why doesn't the compiler report a missing semicolon?
<p>I have this simple program:</p>

<pre><code>#include &lt;stdio.h&gt;

struct S
{
    int i;
};

void swap(struct S *a, struct S *b)
{
    struct S temp;
    temp = *a    /* Oops, missing a semicolon here... */
    *a = *b;
    *b = temp;
}

int main(void)
{
    struct S a = { 1 };
    struct S b = { 2 };

    swap(&amp;a, &amp;b);
}
</code></pre>

<p>As seen <a href="http://ideone.com/jaNv9B" rel="noreferrer">on e.g. ideone.com</a> this gives an error:</p>

<blockquote>
<pre><code>prog.c: In function 'swap':
prog.c:12:5: error: invalid operands to binary * (have 'struct S' and 'struct S *')
     *a = *b;
     ^
</code></pre>
</blockquote>

<p>Why doesn't the compiler detect the missing semicolon?</p>

<hr>

<p>Note: This question and its answer is motivated by <a href="https://stackoverflow.com/q/40134786">this question</a>. While there are <a href="https://stackoverflow.com/q/7071168">other questions</a> similar to this, I didn't find anything mentioning the free-form capacity of the C language which is what is causing this and related errors.</p>