aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-02-17 11:54:56 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-02-17 06:54:56 -0500
commitbeb31faa5b56bf3a8b384d4ae9ef8f256610ed9b (patch)
treefd20170fb3101b264bc6232feab956f99571a2a8 /gcc
parenta11759a38c42fd52cc46ebfeeec8f5bc98e9f1ed (diff)
downloadgcc-beb31faa5b56bf3a8b384d4ae9ef8f256610ed9b.zip
gcc-beb31faa5b56bf3a8b384d4ae9ef8f256610ed9b.tar.gz
gcc-beb31faa5b56bf3a8b384d4ae9ef8f256610ed9b.tar.bz2
* parse.y (simple_stmt): Use getdecls() to check for decl.
From-SVN: r18032
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/parse.c4
-rw-r--r--gcc/cp/parse.y4
3 files changed, 8 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6da997c..8261905 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * parse.y (simple_stmt): Use getdecls() to check for decl.
+
Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
* Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
diff --git a/gcc/cp/parse.c b/gcc/cp/parse.c
index 80ef276..d94c905 100644
--- a/gcc/cp/parse.c
+++ b/gcc/cp/parse.c
@@ -7483,7 +7483,7 @@ case 687:
/* If the condition wasn't a declaration, clear out the
block we made for it and start a new one here so the
optimization in expand_end_loop will work. */
- if (TREE_CODE (yyvsp[0].ttype) != VAR_DECL)
+ if (getdecls () == NULL_TREE)
{
do_poplevel ();
do_pushlevel ();
@@ -7615,7 +7615,7 @@ case 694:
/* If the condition wasn't a declaration, clear out the
block we made for it and start a new one here so the
optimization in expand_end_loop will work. */
- if (yyvsp[-1].ttype == NULL_TREE || TREE_CODE (yyvsp[-1].ttype) != VAR_DECL)
+ if (getdecls () == NULL_TREE)
{
do_poplevel ();
do_pushlevel ();
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index edc6cf7..01e0f75 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -3658,7 +3658,7 @@ simple_stmt:
/* If the condition wasn't a declaration, clear out the
block we made for it and start a new one here so the
optimization in expand_end_loop will work. */
- if (TREE_CODE ($4) != VAR_DECL)
+ if (getdecls () == NULL_TREE)
{
do_poplevel ();
do_pushlevel ();
@@ -3776,7 +3776,7 @@ simple_stmt:
/* If the condition wasn't a declaration, clear out the
block we made for it and start a new one here so the
optimization in expand_end_loop will work. */
- if ($7 == NULL_TREE || TREE_CODE ($7) != VAR_DECL)
+ if (getdecls () == NULL_TREE)
{
do_poplevel ();
do_pushlevel ();