This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gfortran, committed] minor updates to trans-decl.c


Just a bunch of minor issues that I saw while reading code.

Committed under the obviously correct rule, after building and verifying that
the warning still is being (not) issued correctly.

- Tobi

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/ChangeLog,v
retrieving revision 1.237
diff -u -p -r1.237 ChangeLog
--- ChangeLog   10 Oct 2004 14:35:39 -0000      1.237
+++ ChangeLog   13 Oct 2004 22:35:29 -0000
@@ -1,3 +1,9 @@
+2004-10-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       * trans-decl.c (generate_local_decl): Simplify logic, fix comment
+       typo.
+       (gfc_generate_function_code): Fix formatting issue.
+
 2004-10-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

        * module.c: Fix formatting issues.
Index: trans-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans-decl.c,v
retrieving revision 1.45
diff -u -p -r1.45 trans-decl.c
--- trans-decl.c        1 Oct 2004 15:11:22 -0000       1.45
+++ trans-decl.c        13 Oct 2004 22:35:29 -0000
@@ -2087,13 +2087,10 @@ generate_local_decl (gfc_symbol * sym)
     {
       if (sym->attr.referenced)
         gfc_get_symbol_decl (sym);
-      else if (sym->attr.dummy)
-        {
-          if (warn_unused_parameter)
+      else if (sym->attr.dummy && warn_unused_parameter)
             warning ("unused parameter `%s'", sym->name);
-        }
       /* Warn for unused variables, but not if they're inside a common
-        block or are use_associated.  */
+        block or are use-associated.  */
       else if (warn_unused_variable
               && !(sym->attr.in_common || sym->attr.use_assoc))
        warning ("unused variable `%s'", sym->name);
@@ -2231,7 +2228,7 @@ gfc_generate_function_code (gfc_namespac

   if (TREE_TYPE (DECL_RESULT (fndecl)) != void_type_node)
     {
-      if (sym->attr.subroutine ||sym == sym->result)
+      if (sym->attr.subroutine || sym == sym->result)
        {
          result = current_fake_result_decl;
          current_fake_result_decl = NULL_TREE;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]