From: Mikael Morin <mikael.morin@sfr.fr>
To: fortran@gcc.gnu.org
Cc: Steve Kargl <sgk@troutmask.apl.washington.edu>,
Janne Blomqvist <blomqvist.janne@gmail.com>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH,Fortran] Handle 'q' exponent-letter in real-literal-constant
Date: Wed, 27 Apr 2011 21:58:00 -0000 [thread overview]
Message-ID: <201104272254.40882.mikael.morin@sfr.fr> (raw)
In-Reply-To: <20110426230626.GA6972@troutmask.apl.washington.edu>
On Wednesday 27 April 2011 01:06:26 Steve Kargl wrote:
> > > Index: primary.c
> > > ===================================================================
> > > --- primary.c (revision 172974)
> > > +++ primary.c (working copy)
> > > @@ -541,6 +541,17 @@ match_real_constant (gfc_expr **result,
> > >
> > > goto done;
> > >
> > > exp_char = c;
> > >
> > > +
> > > + if (c == 'q')
> > > + {
> > > + if (gfc_notify_std (GFC_STD_GNU, "Extension: exponent-letter 'q'
> > > in " + "real-literal-constant at %C") ==
> > > FAILURE) + return MATCH_ERROR;
> > > + else if (gfc_option.warn_real_q_constant)
> > > + gfc_warning("Extension: exponent-letter 'q' in
> > > real-literal-constant
> >
> > "
> >
> > > + "at %C");
> > > + }
> >
> > I think the above could generate double warnings. With -pedantic for
> > example (but I didn't check).
>
> It's an 'if -- else if' construct. If gfc_notify_std == FAILURE, then
> the error message is issues and the function returns. If it is TRUE,
> then there should be no messages and else if() is tested.
My concern is that gfc_notify_std seems to return SUCCESS on warnings (I can't
test right now as make has decided to rebuild the whole middle-end :-(). Then,
I expect double warnings with -pedantic -Wreal-q-constant as -pedantic is a
(the only one ?) case outputing warnings for GNU extensions.
Mikael
next prev parent reply other threads:[~2011-04-27 20:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 19:26 Steve Kargl
2011-04-25 19:45 ` Steve Kargl
2011-04-25 19:57 ` Janne Blomqvist
2011-04-25 20:15 ` Steve Kargl
2011-04-25 21:38 ` Janne Blomqvist
2011-04-26 18:07 ` Steve Kargl
2011-04-26 18:11 ` Janne Blomqvist
2011-04-26 22:33 ` Mikael Morin
2011-04-26 23:44 ` Steve Kargl
2011-04-27 21:58 ` Mikael Morin [this message]
2011-04-27 22:40 ` Steve Kargl
2011-04-28 0:34 ` Mikael Morin
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=201104272254.40882.mikael.morin@sfr.fr \
--to=mikael.morin@sfr.fr \
--cc=blomqvist.janne@gmail.com \
--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).