* parse.y (simple_stmt): Use getdecls() to check for decl.
authorJason Merrill <jason@yorick.cygnus.com>
Tue, 17 Feb 1998 11:54:56 +0000 (11:54 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 17 Feb 1998 11:54:56 +0000 (06:54 -0500)
From-SVN: r18032

gcc/cp/ChangeLog
gcc/cp/parse.c
gcc/cp/parse.y

index 6da997c54323496b0a2e7c78a84d1834bd1255b4..82619050b477246a26e3dc434f5f941717f7ac72 100644 (file)
@@ -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 
index 80ef276edeb0e3da396b1fc9d566653bb8190feb..d94c9054790dfaf74c3bcfdbf73f4afffe6a8a20 100644 (file)
@@ -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 ();
index edc6cf7982b381e6d6119f51cd7516085c11f554..01e0f755f62d4f7d5ea9bb6aabb86305d0654870 100644 (file)
@@ -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 ();