This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran, patch] Improve module version error messages
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 3 Mar 2012 17:48:47 +0200
- Subject: Re: [fortran, patch] Improve module version error messages
- Authentication-results: mr.google.com; spf=pass (google.com: domain of blomqvist.janne@gmail.com designates 10.112.45.74 as permitted sender) smtp.mail=blomqvist.janne@gmail.com; dkim=pass header.i=blomqvist.janne@gmail.com
- References: <10076D32-0B4F-4394-9D68-01FA0B1A0D64@gmail.com>
On Sat, Mar 3, 2012 at 11:53, FX <fxcoudert@gmail.com> wrote:
> Hi all,
>
> Attached patch was triggered by PR 52313 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52313), and tries to improve error messages for module reading. It fixes one spelling of "GFORTRAN" --> "GNU Fortran" and improves the error reporting of old *unversioned* format from:
>
>> Parse error when checking module version for file 'blah.mod' opened at (1)
>
>
> to:
>
>> Cannot read module file 'blah.mod' opened at (1), because it was created by an older version of GNU Fortran
What if the .mod file has been created by another compiler? Or do we
have a separate error message for that?
> In addition, I looked at the message emitted for old, *versioned* format:
>
>> Wrong module version '6' (expected '9') for file 'blah.mod' opened at (1)
>
>
> I think this message is not actually clearer to the user than the new one, so I substituted the new message to it too. That means we don't present the version strings (which are currently numbers) to the user, and it also seems better to me: those are for internal use anyway, and not documented. They're useful only to us, and they're written in the module file anyway.
Yes, showing the version number isn't really useful.
--
Janne Blomqvist