public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jerry DeLisle <jvdelisle@charter.net>
To: Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc: gfortran <fortran@gcc.gnu.org>, gcc patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, fortran]  [5/6 Regression] Line continuation followed by comment character in string fails to compile
Date: Sat, 16 May 2015 20:33:00 -0000	[thread overview]
Message-ID: <5557A15D.3020205@charter.net> (raw)
In-Reply-To: <55578226.60701@charter.net>

On 05/16/2015 10:45 AM, Jerry DeLisle wrote:
--- snip ---

> Thanks Steve,
> 
> Committed revision 223248.
> 
> 

I had some time to play with this a little more this afternoon.

I am going to commit the following little patchlet that gives us the nice
warning we should have. (After full regression testing of course)

gfc -Wall continuation_13.f90
continuation_13.f90:22:4: Warning: Missing ‘&’ in continued character constant
at (1) [-Wampersand]
continuation_13.f90:24:4: Warning: Missing ‘&’ in continued character constant
at (1) [-Wampersand]


Index: scanner.c
===================================================================
--- scanner.c	(revision 223250)
+++ scanner.c	(working copy)
@@ -1383,7 +1383,12 @@
 			     "constant at %C");
 	    }
 	  else if (!in_string && (c == '\'' || c == '"'))
+	    {
+	      gfc_warning (OPT_Wampersand,
+			     "Missing %<&%> in continued character "
+			     "constant at %C");
 	      goto done;
+	    }
 	  /* Both !$omp and !$ -fopenmp continuation lines have & on the
 	     continuation line only optionally.  */
 	  else if (openmp_flag || openacc_flag || openmp_cond_flag)



  reply	other threads:[~2015-05-16 19:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14  2:18 Jerry DeLisle
2015-05-16 15:09 ` Jerry DeLisle
2015-05-16 15:17   ` Steve Kargl
2015-05-16 19:00     ` Jerry DeLisle
2015-05-16 20:33       ` Jerry DeLisle [this message]
2015-05-17 15:13         ` Jerry DeLisle
2015-05-16 15:54 ` Mikael Morin
2015-05-16 17:45   ` Jerry DeLisle

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=5557A15D.3020205@charter.net \
    --to=jvdelisle@charter.net \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=sgk@troutmask.apl.washington.edu \
    /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).