Commit 9bbdf48e by Jason Merrill Committed by Jason Merrill

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
parent c4ec74e8
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) Sat Nov 28 10:56:32 1998 Jeffrey A Law (law@cygnus.com)
* configure.in (alpha*-*-netbsd): Fix typo. * configure.in (alpha*-*-netbsd): Fix typo.
......
...@@ -767,8 +767,13 @@ add_new_handler (region, newhandler) ...@@ -767,8 +767,13 @@ add_new_handler (region, newhandler)
function_eh_regions[region].handlers = newhandler; function_eh_regions[region].handlers = newhandler;
else 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; last->next = newhandler;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment