X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gas%2Fehopt.c;h=c09eb15b4983f86f9884b5590dfafabbf1c2c1ec;hb=d905c788cf58f2d9b6346fab2d3a53c21fab8adf;hp=ece0f2b74c0c529ef51c6a754b8ebaaf3460cf00;hpb=fa8f86ff3b8e5b29e3b217abeaa33a747052c43e;p=binutils-gdb.git diff --git a/gas/ehopt.c b/gas/ehopt.c index ece0f2b74c0..c09eb15b498 100644 --- a/gas/ehopt.c +++ b/gas/ehopt.c @@ -1,5 +1,5 @@ /* ehopt.c--optimize gcc exception frame information. - Copyright 1998, 2000, 2001, 2003, 2005, 2007, 2008 + Copyright 1998, 2000, 2001, 2003, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Ian Lance Taylor . @@ -227,6 +227,19 @@ get_cie_info (struct cie_info *info) return 1; } +enum frame_state +{ + state_idle, + state_saw_size, + state_saw_cie_offset, + state_saw_pc_begin, + state_seeing_aug_size, + state_skipping_aug, + state_wait_loc4, + state_saw_loc4, + state_error, +}; + /* This function is called from emit_expr. It looks for cases which we can optimize. @@ -245,18 +258,7 @@ check_eh_frame (expressionS *exp, unsigned int *pnbytes) { struct frame_data { - enum frame_state - { - state_idle, - state_saw_size, - state_saw_cie_offset, - state_saw_pc_begin, - state_seeing_aug_size, - state_skipping_aug, - state_wait_loc4, - state_saw_loc4, - state_error, - } state; + enum frame_state state; int cie_info_ok; struct cie_info cie_info; @@ -324,7 +326,7 @@ check_eh_frame (expressionS *exp, unsigned int *pnbytes) case state_saw_size: case state_saw_cie_offset: /* Assume whatever form it appears in, it appears atomically. */ - d->state += 1; + d->state = (enum frame_state) (d->state + 1); break; case state_saw_pc_begin: