aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1998-01-13 13:40:27 -0800
committerJeff Law <law@gcc.gnu.org>1998-01-13 14:40:27 -0700
commit8d47dfc57f318e28e4e551633705b8d89899dec9 (patch)
treeb41a279829fd35c0607ca86279981463de72a063 /gcc
parentc995fea1951e649c43de8a41275ce7afbe6af7bc (diff)
downloadgcc-8d47dfc57f318e28e4e551633705b8d89899dec9.zip
gcc-8d47dfc57f318e28e4e551633705b8d89899dec9.tar.gz
gcc-8d47dfc57f318e28e4e551633705b8d89899dec9.tar.bz2
* c-typeck.c (comptypes): Exit early on NULL input.
From-SVN: r17347
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/c-typeck.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1ac803a..ef5bb63 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,7 @@
Tue Jan 13 22:39:40 1998 Richard Henderson (rth@cygnus.com)
+ * c-typeck.c (comptypes): Exit early on NULL input.
+
* haifa-sched.c (schedule_insns): Correctly remove inter-block
dependencies after reload.
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 5bf265a..fb5efd7 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -441,7 +441,8 @@ comptypes (type1, type2)
/* Suppress errors caused by previously reported errors. */
- if (t1 == t2 || TREE_CODE (t1) == ERROR_MARK || TREE_CODE (t2) == ERROR_MARK)
+ if (t1 == t2 || !t1 || !t2
+ || TREE_CODE (t1) == ERROR_MARK || TREE_CODE (t2) == ERROR_MARK)
return 1;
/* Treat an enum type as the integer type of the same width and