From patchwork Sun Jul 25 18:51:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerry DeLisle X-Patchwork-Id: 59877 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E344EB6F06 for ; Mon, 26 Jul 2010 04:52:03 +1000 (EST) Received: (qmail 11262 invoked by alias); 25 Jul 2010 18:52:00 -0000 Received: (qmail 11242 invoked by uid 22791); 25 Jul 2010 18:51:59 -0000 X-SWARE-Spam-Status: No, hits=3.0 required=5.0 tests=AWL, BAYES_00, BOTNET, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from vms173019pub.verizon.net (HELO vms173019pub.verizon.net) (206.46.173.19) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 25 Jul 2010 18:51:55 +0000 Received: from [192.168.1.10] ([unknown] [64.234.92.14]) by vms173019.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L6400D3CN256G71@vms173019.mailsrvcs.net>; Sun, 25 Jul 2010 13:51:43 -0500 (CDT) Message-id: <4C4C87BC.3020507@verizon.net> Date: Sun, 25 Jul 2010 11:51:40 -0700 From: Jerry DeLisle User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100527 Thunderbird/3.0.5 MIME-version: 1.0 To: Tobias Burnus Cc: gfortran , gcc patches Subject: Re: [patch, fortran] PR42852 -Wall warns about truncated lines when only a continuation character is truncated References: <4C4BB728.4070707@verizon.net> <4C4C0292.1080104@net-b.de> In-reply-to: <4C4C0292.1080104@net-b.de> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 07/25/2010 02:23 AM, Tobias Burnus wrote: > integer :: a [many spaces]& > , b > end > > The error is: > , b > 1 > Error: Invalid character in name at (1) > > Expected: Additionally, one should see > Warning: Line truncated at (1) > In case of free form code, the '&' is significant - and it can easily > happen that just the continuation character moves beyond column 132. > I will commit the following shortly as obvious to give the warning of free-form continuation gets chopped. Regression tested on x86-64-linux-gnu Regards, Jerry Index: scanner.c =================================================================== --- scanner.c (revision 162512) +++ scanner.c (working copy) @@ -1581,7 +1581,8 @@ load_line (FILE *input, gfc_char_t **pbuf, int *pb if (!trunc_warn && c != '!') trunc_warn = true; - if (trunc_warn && (c == '&' || c == '!')) + if (trunc_warn && ((gfc_current_form == FORM_FIXED && c == '&') + || c == '!')) trunc_warn = false; if (c == '!')