public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/35882] Miscounted continuation lines when interspersed with data
Date: Wed, 09 Apr 2008 09:06:00 -0000	[thread overview]
Message-ID: <20080409090555.9084.qmail@sourceware.org> (raw)
In-Reply-To: <bug-35882-15996@http.gcc.gnu.org/bugzilla/>



------- 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	other threads:[~2008-04-09  9:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-09  8:08 [Bug fortran/35882] New: " J dot Hogg at rl dot ac dot uk
2008-04-09  9:06 ` burnus at gcc dot gnu dot org [this message]
2008-04-09  9:19 ` [Bug fortran/35882] " burnus at gcc dot gnu dot org
2008-04-14  0:45 ` jvdelisle at gcc dot gnu dot org
2008-04-14  0:48 ` jvdelisle at gcc dot gnu dot org
2008-04-14  1:14 ` jvdelisle at gcc dot gnu dot org
2008-04-20 21:13 ` jvdelisle at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080409090555.9084.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).