stmt.c (expand_expr_stmt): Must generate code for statements within an expression...
authorCraig Burley <burley@gnu.ai.mit.edu>
Sat, 28 Mar 1998 00:38:46 +0000 (00:38 +0000)
committerJeff Law <law@gcc.gnu.org>
Sat, 28 Mar 1998 00:38:46 +0000 (17:38 -0700)
        * stmt.c (expand_expr_stmt): Must generate code for
        statements within an expression (gcc's `({ ... )}')
        even if -fsyntax-only.
Patch from Craig.

From-SVN: r18865

gcc/ChangeLog
gcc/stmt.c

index c887af5..860da31 100644 (file)
@@ -1,3 +1,9 @@
+Sat Mar 28 01:37:33 1998  Craig Burley  <burley@gnu.ai.mit.edu>
+
+       * stmt.c (expand_expr_stmt): Must generate code for
+       statements within an expression (gcc's `({ ... )}')
+       even if -fsyntax-only.
+
 Sat Mar 28 01:06:12 1998  Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
                          Jeffrey A Law  (law@cygnus.com)
 
index 2b518fc..b444735 100644 (file)
@@ -1536,7 +1536,7 @@ expand_expr_stmt (exp)
     exp = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (exp)), exp);
 
   last_expr_type = TREE_TYPE (exp);
-  if (! flag_syntax_only)
+  if (! flag_syntax_only || expr_stmts_for_value)
     last_expr_value = expand_expr (exp,
                                   (expr_stmts_for_value
                                    ? NULL_RTX : const0_rtx),