public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jerry DeLisle <jvdelisle@verizon.net>
To: Tobias Burnus <burnus@net-b.de>
Cc: "'fortran@gcc.gnu.org'" <fortran@gcc.gnu.org>,
	 gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch, Fortran] PR32987 - Allow TAB in FORMAT statements as  extension  and warn with -std=f*
Date: Sat, 04 Aug 2007 18:08:00 -0000	[thread overview]
Message-ID: <46B4BFB2.3080909@verizon.net> (raw)
In-Reply-To: <46B4B951.2050501@net-b.de>

Tobias Burnus wrote:
> :ADDPATCH fortran:
> 
> In FORMAT statements, standard Fortran only allow tabs ('\t') in string
> literals. However, all other compiler I checked allow it: ifort, g95,
> NAG f95, sunf95, openf95. Except of ifort (with the option "-stand f95")
> none of the compilers even print a compile-time warning.
> 
> gfortran currently accepts tabs quietly at compile time, but gives a
> run-time error.
> 
> Given that all other compilers allow it, I would suggest to allow it as
> well - and follow ifort by giving a warning with -std=f95/f2003.
> (Actually, I have chosen to give a gfc_warning instead of an gfc_error
> to save myself from several levels of error propagation :-)
> 
> Note, however, that Steve disagrees (see PR for full quote):
> 
> "A tab is not a legal substitution for a space character." [...]
> "Here's a patch that permits gfortran to accept your INVALID code."
> (His patch is the same as the libgfortran part of my patch; he continues
> then:)
> "[...] I will activity oppose application of this patch by others."
> 
> Reasoning by Steve:
> 
> "gfortran has been around for a long time now and this is the first
> report of the tab-in-format runtime error. gfortran should complain
> loudly that the code is invalid."
> 
> 
> While I still think accepting it with a compile-time warning is enough,
> I strongly believe that there should be in any case a COMPILE-TIME
> diagnostic whatever we decide about accepting or rejecting it at run time.
> 
I think everyone is in agreement that a compile time diagnostic should be given:

I think the default behavior, without -std=XXX, should give the warning at compile.

I think that for -std=f95 or -std=f2003, an error should be given at compile time.

At runtime, quiet acceptance for default, there is no runtime for -std=

Regards.

Jerry

  reply	other threads:[~2007-08-04 18:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-04 17:37 Tobias Burnus
2007-08-04 18:08 ` Jerry DeLisle [this message]
2007-08-04 20:30   ` Tobias Burnus
2007-08-09 21:41     ` FX Coudert
2007-08-09 22:05       ` Tobias Burnus

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=46B4BFB2.3080909@verizon.net \
    --to=jvdelisle@verizon.net \
    --cc=burnus@net-b.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@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).