From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9237 invoked by alias); 9 Apr 2008 09:06:41 -0000 Received: (qmail 9085 invoked by uid 48); 9 Apr 2008 09:05:55 -0000 Date: Wed, 09 Apr 2008 09:06:00 -0000 Message-ID: <20080409090555.9084.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/35882] Miscounted continuation lines when interspersed with data In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-04/txt/msg00681.txt.bz2 ------- 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