This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH, Fortran] Some work on PR 29835: Improve the error message for an invalid format
- From: FX <fxcoudert at gmail dot com>
- To: Daniel Kraft <d at domob dot eu>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Fortran List <fortran at gcc dot gnu dot org>
- Date: Tue, 22 Jul 2008 16:11:09 +0100
- Subject: Re: [PATCH, Fortran] Some work on PR 29835: Improve the error message for an invalid format
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:in-reply-to:references :mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; bh=Dqb4UQOsy6lWqxRwiwEbS5dYVPneJIxzQkL54CBtuBA=; b=j1QcENLORSKUcF67/FewzZ8vg+W7m0DMrI8Wz+JIg4oGgzX3b3cvjEYyiHhW4ZlDRa A1KmNW0aoAiSbTDcSNYCjc7qjTAuTZHaVOOe2UFMnsB/MswcgMQTocplOoG3jKzvQvG+ 6h7/EOsW8NAnm2U1Jt/wDjEngTMqSbZvLWGxw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=in-reply-to:references:mime-version:content-type:message-id:cc :content-transfer-encoding:from:subject:date:to:x-mailer; b=ut+HFSSfSdjqEmGgQSzOlY7jmLFgt4ZOMlfYziTYOAM8Qgp6sDuob0LvdSGKM68bQk gAXPO+ZgBt9vaYuolSoX9Gg6xjt7Edx5/Yj6A9TowJ2QUBsvSpshjQjGxrpxF/X1nMYB hj8QbyGlo31xqydw8sXHsHxDeyXRLbHQ/57z0=
- References: <4885EB9C.9080102@domob.eu> <F46E2351-9CE5-4E4B-85A0-ABFB3CAA2271@gmail.com> <4885F5A9.5090401@domob.eu>
I'd suggest to do it like in the library? That is, set
unexpected_element to the full format string and call
gfc_error (error, error_element, &format_locus);
Works for me. I suspected that unexpected_element was used elsewhere,
but it isn't, so your proposal is sound and safe.
The two execute-tests don't work anyway--any suggestions on how to
make those do what expected? Otherwise I'll remove them if that's
ok rather than leaving them in without any effect. Or should I fix
the output-clauses accordingly, leave them and replace the XXX
comment by an informative one stating that and why they are not
really testing the runtime behaviour at the moment?
I don't know why it's failing. Have you looked at the testsuite log
file (${builddir}/gcc/testsuite/gfortran/gfortran.log)? It'd be
better to have runtime checks, if you manage to have them work. If
you can't, well, I don't believe they should be included at all.
BTW, I won't do anything to the PR as it is not fixed fully, ok?
Or should I mark it fixed and comment that further changes won't be
done or something like that?
As a general rule: after committing, please add a comment saying what
you've done and what still needs to be done to close the PR. In that
case, we don't want to implement the Q descriptor, so unless I'm
mistaken, you should indeed close it (another maintainer may want to
reopen it if they see fit, but I think it's highly unlikely).
FX
--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/