summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1998-11-29 23:01:19 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1998-11-29 23:01:19 +0000
commit256717fad24f834d103cf56015f72e4f7947dba7 (patch)
tree60e6cc8d8ee7bb0c07e450ba1d75e9e02d9813bf /gcc
parent4b1310bcec8e5bd228ff1690c56378cca8708133 (diff)
downloadgcc-256717fad24f834d103cf56015f72e4f7947dba7.tar.gz
* except.c (add_new_handler): Complain about additional handlers
after one that catches everything. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23990 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/except.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 987262b037b..c00c1b5a018 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 ae6ede2f112..70e19ef1045 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;
}
}