reduce spurious warnings using -fsyntax-only
authorCraig Burley <craig@jcb-sc.com>
Mon, 22 Feb 1999 08:41:42 +0000 (08:41 +0000)
committerCraig Burley <burley@gcc.gnu.org>
Mon, 22 Feb 1999 08:41:42 +0000 (03:41 -0500)
From-SVN: r25366

gcc/ChangeLog
gcc/stmt.c

index 74c103122be332e514613a92a57fb31324748ac4..1ee7875adc99b4fcbd88ac424e6ae681ad67242a 100644 (file)
@@ -1,3 +1,8 @@
+Mon Feb 22 11:40:44 1999  Craig Burley  <craig@jcb-sc.com>
+
+       Decrease spurious warnings from -fsyntax-only:
+       * stmt.c (expand_expr_stmt): Expand expr even when -fsyntax-only.
+
 Mon Feb 22 10:55:00 1999  Gavin Romig-Koch  <gavin@cygnus.com>
 
        * c-lex.c (yylex): Replace warning about integer constants being
index 8d4351ac3294a3bbf6d023737aba92b3784417ce..2c0f4f640c29fdf7c227aef87b632cf89b22dead 100644 (file)
@@ -1692,13 +1692,10 @@ 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 && ! expr_stmts_for_value)
-    last_expr_value = 0;
-  else
-    last_expr_value = expand_expr (exp,
-                                  (expr_stmts_for_value
-                                   ? NULL_RTX : const0_rtx),
-                                  VOIDmode, 0);
+  last_expr_value = expand_expr (exp,
+                                (expr_stmts_for_value
+                                 ? NULL_RTX : const0_rtx),
+                                VOIDmode, 0);
 
   /* If all we do is reference a volatile value in memory,
      copy it to a register to be sure it is actually touched.  */