This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[patch,fortran,committed] Changed error message from "ELSE IF clause" to "IF clause" (PR29454)


Commit as obvious (it is a kind of typo):

Current result:
test.f90:2:
  if (l) then
     1
Error: ELSE IF clause at (1) requires a scalar LOGICAL expression

New result:
test.f90:2:
  if (l) then
     1
Error: IF clause at (1) requires a scalar LOGICAL expression

Using IF clause for "ELSE IF" is also correct, the other round it is
misleading.

Committed to the trunk after building and regression testing
(check-gfortran only).
Does it make sense to check this also into the GCC 4.2 branch or not?

Tobias


Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog       (Revision 118660)
+++ gcc/fortran/ChangeLog       (Arbeitskopie)
@@ -1,3 +1,8 @@
+2006-11-10  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/29454
+       * resolve.c (gfc_resolve_blocks): Fix error message.
+
 2006-11-10 Paul Thomas <pault@gcc.gnu.org>

        PR fortran/29315
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (Revision 118660)
+++ gcc/fortran/resolve.c       (Arbeitskopie)
@@ -4749,7 +4749,7 @@
          if (t == SUCCESS && b->expr != NULL
              && (b->expr->ts.type != BT_LOGICAL || b->expr->rank != 0))
            gfc_error
-             ("ELSE IF clause at %L requires a scalar LOGICAL expression",
+             ("IF clause at %L requires a scalar LOGICAL expression",
               &b->expr->where);
          break;


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