2014-07-27 Andrei Herman * c-parser.c (c_parser_declaration_or_fndef): Force a block for function body. (c_parser_force_block_for_label): New. (c_parser_label): Add parameter. Create a label scope for the first label of a statement. (c_parser_compound_statement_nostart): Pass last_label when calling c_parser_label. (c_parser_statement): Likewise. (c_parser_statement_after_labels): Force a block for compound statement. (c_parser_c99_block_statement): Likewise for switch and loop statement if its not a compound statement. Push/pop the forced scope. (c_parser_if_body): Likewise for if-then statement. Pass last_label when calling c_parser_label. (c_parser_else_body): Likewise for if-else statement. * c-decl.c (get_enclosing_non_forced_scope): New. (clear_keep_current_level): New. (pushdecl): If current scope is a forced scope, put the declaration in the enclosing non-forced scope. * c-tree.h (clear_keep_current_level): New. * c-typeck.c (pop_scope_for_labels): New. (c_finish_goto_label, c_finish_goto_ptr, c_finish_return, c_finish_bc_stmt): Call pop_scope_for_labels to close current label scope if any. (c_end_compound_stmt): Likewise.