diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-11-29 23:01:19 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-11-29 18:01:19 -0500 |
commit | 9bbdf48eea4093baee7f2c7438439ac848855e4b (patch) | |
tree | 60e6cc8d8ee7bb0c07e450ba1d75e9e02d9813bf | |
parent | c4ec74e871284bb837afd29d0324f87361e32677 (diff) | |
download | gcc-9bbdf48eea4093baee7f2c7438439ac848855e4b.zip gcc-9bbdf48eea4093baee7f2c7438439ac848855e4b.tar.gz gcc-9bbdf48eea4093baee7f2c7438439ac848855e4b.tar.bz2 |
except.c (add_new_handler): Complain about additional handlers after one that catches everything.
* except.c (add_new_handler): Complain about additional handlers
after one that catches everything.
From-SVN: r23990
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/except.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 987262b..c00c1b5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sun Nov 29 22:59:40 1998 Jason Merrill <jason@yorick.cygnus.com> + + * except.c (add_new_handler): Complain about additional handlers + after one that catches everything. + Sat Nov 28 10:56:32 1998 Jeffrey A Law (law@cygnus.com) * configure.in (alpha*-*-netbsd): Fix typo. diff --git a/gcc/except.c b/gcc/except.c index ae6ede2..70e19ef10 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -767,8 +767,13 @@ add_new_handler (region, newhandler) function_eh_regions[region].handlers = newhandler; else { - for ( ; last->next != NULL; last = last->next) - ; + for ( ; ; last = last->next) + { + if (last->type_info == CATCH_ALL_TYPE) + pedwarn ("additional handler after ..."); + if (last->next == NULL) + break; + } last->next = newhandler; } } |