Label definitions

In Standard C and Standard C++, a statement must follow a label definition. In C and C++, a label definition can be followed immediately by a right brace.

Show/hideErrors

The compiler generates a warning if a label definition is followed immediately by a right brace.

Show/hideExample

void foo(char *p)
{
    if (p)
    {
        /* ... */
label:
    }
}
Copyright © 2007-2008, 2011 ARM. All rights reserved.ARM DUI 0376C
Non-ConfidentialID061811