This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Declaration after a label
- From: "Shaun Jackman" <sjackman at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 31 Mar 2006 11:39:28 -0700
- Subject: Declaration after a label
- Reply-to: "Shaun Jackman" <sjackman at gmail dot com>
GCC reports an error for this snippet:
int main()
{
foo:
int x;
}
foo.c:4: error: expected expression before 'int'
... but not this snippet:
int main()
{
foo:
(void)0;
int x;
}
Is this expected behaviour? At the very least, it seems like an
unusual distinction.
Please cc me in your reply. Cheers,
Shaun