http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52655
--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2012-03-21
11:29:40 UTC ---
(In reply to comment #0)
> The following code compiles with error: label at end of compound statement
> with
> the gcc 4.6.1 compiler.
>
> Content of t.c:
> ----8<----
> void
> foo (int op)
> {
> int x = 100000 >> 3; /* OK */
>
> switch (op)
> {
> case 0:
> x = 100000 >> 3; /* t.c:12:5: error: label at end of compound
> statement */
> break;
>
> default:
The "default:" acts as a label, and it needs a statement after it. Just add
";" after it, or delete it. The shift has nothing to do with this issue.