OSDN Git Service

PR fortran/29459
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Aug 2007 12:39:18 +0000 (12:39 +0000)
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Aug 2007 12:39:18 +0000 (12:39 +0000)
* trans.c (gfc_create_var_np): Do not emit warnings for
anonymous variables.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127513 138bc75d-0d04-0410-961f-82ee72b054a4

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

index e43870d..f9c4dd4 100644 (file)
@@ -1,5 +1,11 @@
 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
        * decl.c (gfc_get_type_attr_spec): Fix whitespace.
        (gfc_match_derived_decl): Fix logic.
index 79112e5..7092ac8 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;
 }