aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2005-04-20 17:41:48 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2005-04-20 17:41:48 +0100
commit187230a795716fc0d98cb066402fe9d71639996c (patch)
treee2e44d98a3c2439eda0265c0bce9ef5990fc410d /gcc/reload1.c
parent2a9254314b416c9d6e8eccf600a54ed829a48147 (diff)
downloadgcc-187230a795716fc0d98cb066402fe9d71639996c.zip
gcc-187230a795716fc0d98cb066402fe9d71639996c.tar.gz
gcc-187230a795716fc0d98cb066402fe9d71639996c.tar.bz2
re PR c/12913 (Jumps into variable length array scope not rejected)
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. From-SVN: r98464
Diffstat (limited to 'gcc/reload1.c')
0 files changed, 0 insertions, 0 deletions