[fortran, patch] Improve module version error messages

FX fxcoudert@gmail.com
Sat Mar 3 09:53:00 GMT 2012


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



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.

So, bootstrapped and regtested on x86_64-apple-darwin11, OK for trunk?

FX
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: module.ChangeLog
Type: application/octet-stream
Size: 135 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120303/dade2cc3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: module.diff
Type: application/octet-stream
Size: 1300 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120303/dade2cc3/attachment-0001.obj>


More information about the Fortran mailing list