------- Comment #1 from burnus at gcc dot gnu dot org  2008-04-09 09:05 -------
Confirm.

The problem is not the settings, but that the counting goes wrong. This can
also be seen if one adds comment or empty lines in between. One would expect
that this should not affect the line count (i.e. error still in line 15) or
that the number decreases, however, it increases.

There is also another bug: The default value for -std=gnu/legacy should be 255
(Fortran 2003) and not 39 (Fortran 95). Currently, "-std=gnu -pedantic" warns
for >39 continuation lines but with "-std=f2003 -pedantic" only for >255
continuation lines!

Note: For fixed form source it actually works, even if one adds empty
lines/comment lines.

The additional bug is fixed by the following patch. The reported bug needs some
studying of scanner.c

Index: options.c
===================================================================
--- options.c   (revision 134131)
+++ options.c   (working copy)
@@ -61,2 +61,2 @@ gfc_init_options (unsigned int argc ATTR
-  gfc_option.max_continue_fixed = 19;
-  gfc_option.max_continue_free = 39;
+  gfc_option.max_continue_fixed = 255;
+  gfc_option.max_continue_free = 255;
@@ -736,0 +737,2 @@ gfc_handle_option (size_t scode, const c
+      gfc_option.max_continue_fixed = 19;
+     gfc_option.max_continue_free = 39;
@@ -745,2 +746,0 @@ gfc_handle_option (size_t scode, const c
-      gfc_option.max_continue_fixed = 255;
-      gfc_option.max_continue_free = 255;
@@ -756,2 +755,0 @@ gfc_handle_option (size_t scode, const c
-      gfc_option.max_continue_fixed = 255;
-      gfc_option.max_continue_free = 255;


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|x86_64-unknown-linux-gnu    |
   GCC host triplet|x86_64-unknown-linux-gnu    |
 GCC target triplet|x86_64-unknown-linux-gnu    |
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2008-04-09 09:05:55
               date|                            |


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

Reply via email to