]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/20147 (ICE on undefined variable in statement expression)
authorPaolo Carlini <pcarlini@suse.de>
Mon, 21 Mar 2005 15:25:39 +0000 (15:25 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 21 Mar 2005 15:25:39 +0000 (15:25 +0000)
2005-03-21  Paolo Carlini  <pcarlini@suse.de>

PR c++/20147
* semantics.c (finish_stmt_expr_expr): Return immediately
if error_operand_p (expr).

From-SVN: r96804

gcc/cp/ChangeLog
gcc/cp/semantics.c

index b441bc027c48c5eeaf44a07ace08576958c2c993..9a94a61d11160ce3e1cf446ec2177e0002ec9c0d 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-21  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/20147
+       * semantics.c (finish_stmt_expr_expr): Return immediately
+       if error_operand_p (expr).
+
 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
 
        PR c++/20240
index 45fa695f294db81cf208716ed91ab2cc2eaa58b1..bb2f3c925ad4b2dfd24fc625111d5c05e6e75b56 100644 (file)
@@ -1443,6 +1443,9 @@ finish_stmt_expr_expr (tree expr)
   tree result = NULL_TREE;
   tree type = void_type_node;
 
+  if (error_operand_p (expr))
+    return error_mark_node;
+  
   if (expr)
     {
       type = TREE_TYPE (expr);