Fix goto checking.
authorJason Merrill <jason@casey.soma.redhat.com>
Fri, 26 May 2000 21:05:05 +0000 (21:05 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 26 May 2000 21:05:05 +0000 (17:05 -0400)
commit6625cdb595e9fa7c320e94c229c5e272893d0206
tree9959d4042ddd7272bf7d0408e17421eae99253b4
parent0137be2dcab07fad0774f03e17086de8620dc3c5
Fix goto checking.

        * cp-tree.h (struct language_function): x_named_labels is now
        a struct named_label_list*.
        * decl.c (struct named_label_use_list): Renamed from...
        (struct named_label_list): ...this.  New struct.
        (push_binding_level): Don't set eh_region.
        (note_level_for_eh): New fn.
        (pop_label): Take label and old value directly.
        (pop_labels): Adjust for new named_labels format.
        (lookup_label): Likewise.
        (poplevel): Note characteristics of a binding level containing a
        named label.  Mess with named label lists earlier.
        (mark_named_label_lists): New fn.
        (mark_lang_function): Call it.
        (use_label): New fn, split out from...
        (make_label_decl): ...here.  Don't call it.
        (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
        check_previous_gotos): New fns, split out from...
        (define_label): ...here.
        (check_switch_goto): New fn.
        (define_case_label): Call it.
        (check_goto): New fn.
        * semantics.c (finish_goto_stmt): Call it and use_label.
        (begin_compound_stmt): If we're a try block, call note_level_for_eh.
        (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.

From-SVN: r34198
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/semantics.c