aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-08-15 12:39:18 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-08-15 12:39:18 +0000
commit049e4fb094d3639d4ef65959e98d143ae44a57ae (patch)
tree8ad02b282561ae6dcad9d4cfb667aa0aa44a2db1 /gcc/fortran/trans.c
parentee5d176a88399eeb47d76f37531257b62b5f36d3 (diff)
downloadgcc-049e4fb094d3639d4ef65959e98d143ae44a57ae.zip
gcc-049e4fb094d3639d4ef65959e98d143ae44a57ae.tar.gz
gcc-049e4fb094d3639d4ef65959e98d143ae44a57ae.tar.bz2
re PR fortran/29459 (Spurious warnings about anonymous variables)
PR fortran/29459 * trans.c (gfc_create_var_np): Do not emit warnings for anonymous variables. From-SVN: r127513
Diffstat (limited to 'gcc/fortran/trans.c')
-rw-r--r--gcc/fortran/trans.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 79112e5..7092ac8 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -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;
}