------- Comment #7 from manfred99 at gmx dot ch  2008-01-22 08:41 -------
Hmm,
I like the idea of being able to compile also legacy code with gfortran.
However, I really see the point Steve is making. With this patch things
get confusing.
If you consider a modified version of Steve's example:
c23456789012345678901234567890123456789012345678901234567890123456789012
      program a
      integer aaaaaaaaaaaa, bbbbbbbbb, cccccccc, dddddddddd, eeeeeeee, f
      1gggg
      f1gggg = 1
      print *, f1gggg
      end program a

If you write this with tabs, then the program becomes invalid.
So the mere user looking at the code can't see whether this is valid code
or not, you have to investigate the individual lines with an editor.

So I really would suggest to do something like
+      if (found_tab)
        {
+         found_tab = false;
+         if (c >= '1' && c <= '9')
+           {
+             *(buffer-1) = c;
+             gfc_warning_now ("Continuation line with tab ... etc.");
+             continue;
+           }
+       }


Secondly: Tradition in gfortran was to bury such things behind -std=legacy.
There are other things which are supported by other compilers and g77 and
which are only supported with -std=legacy in gfortran (e.g. FORMAT("f8")).
I don't care whether it's declared as legacy or not, but there should
perhaps be some overall strategy.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34899

Reply via email to