public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Backslash character at the end of a comment
@ 2017-09-25 16:38 Dominique d'Humières
  2017-09-25 16:40 ` Vladimír Fuka
  0 siblings, 1 reply; 6+ messages in thread
From: Dominique d'Humières @ 2017-09-25 16:38 UTC (permalink / raw)
  To: vladimir.fuka; +Cc: gfortran

Vladimir,

> I noticed strange error after adding a comment. Unexpected elses and end if.
>
> I realized the comment had \ at the end. I added a space after it and I got
> …

Could you please post the code? AFAIR, backslash is not part of the Fortran character set and can only appear in strings (no patience to look at the standard). Gfortran has an option -fbackslash allowing backslash to be interpreted as an escape character (again AFAIU). You may want to have a look at gfortran.dg/backslash*.

Cheers,

Dominique

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Backslash character at the end of a comment
@ 2017-09-25 15:41 Vladimír Fuka
  2017-09-27  0:24 ` Klint Gore
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimír Fuka @ 2017-09-25 15:41 UTC (permalink / raw)
  To: fortran

Hello,

I noticed strange error after adding a comment. Unexpected elses and end if.

I realized the comment had \ at the end. I added a space after it and I got

strings.f90:102:76: warning: backslash and newline separated by space
[enabled by default]
         ! " finishes the string and is not counted to it if not escaped by \
 ^
strings.f90:119.10:

and again the same error, unexpected elses and end if.

Does this reject valid source files or not? What purpose does it
serve? Does it mean a comment is continued on the next line by using a
backslash?

Regards,

  Vladimir

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-27  0:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-25 16:38 Backslash character at the end of a comment Dominique d'Humières
2017-09-25 16:40 ` Vladimír Fuka
2017-09-25 16:49   ` Dominique d'Humières
2017-09-26  9:20     ` Vladimír Fuka
  -- strict thread matches above, loose matches on Subject: below --
2017-09-25 15:41 Vladimír Fuka
2017-09-27  0:24 ` Klint Gore

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).