OSDN Git Service

PR c/12913
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Apr 2005 16:41:48 +0000 (16:41 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Apr 2005 16:41:48 +0000 (16:41 +0000)
commitf5d156fd00f390d9b1b9686e261c45ba9ee24102
treee2e44d98a3c2439eda0265c0bce9ef5990fc410d
parent3472707ff105a1428957d98eb77b6dae29b74097
PR c/12913
* c-tree.h (struct c_label_list): Update comment.
(struct c_label_context): Rename to struct c_label_context_se.
(label_context_stack): Rename to label_context_stack_se.
(C_DECL_UNJUMPABLE_VM, C_DECL_UNDEFINABLE_VM, struct
c_label_context_vm, label_context_stack_vm, c_begin_vm_scope,
c_end_vm_scope): New.
(C_DECL_DECLARED_BUILTIN, C_DECL_USED): Use FUNCTION_DECL_CHECK.
* c-decl.c (pop_scope): Call c_end_vm_scope.
(pushdecl): Call c_begin_vm_scope for variably modified
declarations.
(define_label): Check for jumping into scope of identifier with
variably modified type.  Push label on stack for those defined at
current context of identifiers with variably modified type.
(start_function): Create stack level for context of identifiers
with variably modified type.
(finish_function): Pop stack level for context of identifiers with
variably modified type.
* c-typeck.c (label_context_stack): Rename to
label_context_stack_se.
(label_context_stack_vm, c_begin_vm_scope, c_end_vm_scope): New.
(c_finish_goto_label): Check for jumping into scope of identifier
with variably modified type.  Push label on stack for those jumped
to from current context of identifiers with variably modified
type.
(struct c_switch): Add blocked_vm.
(c_start_case): Initialize blocked_vm.
(do_case): Check blocked_vm.
(c_finish_case): Add comment.
(c_begin_stmt_expr, c_finish_stmt_expr): Update for renamed
variable label_context_stack.

objc:
* objc-act.c (objc_start_function): Create stack level for context
of identifiers with variably modified type.

testsuite:
* gcc.dg/c99-vla-jump-1.c, gcc.dg/c99-vla-jump-2.c,
gcc.dg/c99-vla-jump-3.c, gcc.dg/c99-vla-jump-4.c,
gcc.dg/c99-vla-jump-5.c: New tests.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98464 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ChangeLog
gcc/c-decl.c
gcc/c-tree.h
gcc/c-typeck.c
gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c99-vla-jump-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c99-vla-jump-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c99-vla-jump-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c99-vla-jump-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c99-vla-jump-5.c [new file with mode: 0644]