re PR fortran/31812 (Better message than "syntax error" when truncating long lines)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 27 May 2007 22:42:54 +0000 (22:42 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 27 May 2007 22:42:54 +0000 (22:42 +0000)
2007-05-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/31812
* parse.c (next_statement): Warn for truncated lines if source is free
form.

From-SVN: r125119

gcc/fortran/ChangeLog
gcc/fortran/parse.c

index 11b6e925108de548ab888d412ae9e75f3d7f0320..59278dc2349c77f0fb677daa2c1dafd0e995cc4e 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/31812
+       * parse.c (next_statement): Warn for truncated lines if source is free
+       form.
+
 2007-05-27 Paul Thomas  <pault@gcc.gnu.org>
           Tobias Burnus  <burnus@net-b.de>
 
index 9e47ea416e521417475331455f7c6331fac0523b..46604cfd3cdf6392f74d272a04059eaa2872090f 100644 (file)
@@ -653,7 +653,7 @@ next_statement (void)
 
       if (gfc_at_eol ())
        {
-         if (gfc_option.warn_line_truncation
+         if ((gfc_option.warn_line_truncation || gfc_current_form == FORM_FREE)
              && gfc_current_locus.lb
              && gfc_current_locus.lb->truncated)
            gfc_warning_now ("Line truncated at %C");