From: Jason Merrill Date: Sun, 29 Nov 1998 23:01:19 +0000 (+0000) Subject: except.c (add_new_handler): Complain about additional handlers after one that catches... X-Git-Tag: prereleases/libgcj-0.1~1849 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9bbdf48eea4093baee7f2c7438439ac848855e4b;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 987262b037b0..c00c1b5a0188 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sun Nov 29 22:59:40 1998 Jason Merrill + + * 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 ae6ede2f112f..70e19ef10453 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; } }