re PR fortran/29459 (Spurious warnings about anonymous variables)
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 15 Aug 2007 12:39:18 +0000 (12:39 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 15 Aug 2007 12:39:18 +0000 (12:39 +0000)
PR fortran/29459
* trans.c (gfc_create_var_np): Do not emit warnings for
anonymous variables.

From-SVN: r127513

gcc/fortran/ChangeLog
gcc/fortran/trans.c

index e43870de9ddce0da6a5a377ef1557ed64ef4c403..f9c4dd468d47a6eacd17239bc0292ae0efc471ee 100644 (file)
@@ -1,3 +1,9 @@
+2007-08-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR fortran/29459
+       * trans.c (gfc_create_var_np): Do not emit warnings for
+       anonymous variables.
+
 2007-08-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        PR fortran/33066
index 79112e590ea212f91a437f27ccb95d31f447125d..7092ac8cd0a41a7af463e0699484904185a2a862 100644 (file)
@@ -102,7 +102,15 @@ remove_suffix (char *name, int len)
 tree
 gfc_create_var_np (tree type, const char *prefix)
 {
-  return create_tmp_var_raw (type, prefix);
+  tree t;
+  
+  t = create_tmp_var_raw (type, prefix);
+
+  /* No warnings for anonymous variables.  */
+  if (prefix == NULL)
+    TREE_NO_WARNING (t) = 1;
+
+  return t;
 }