DEC Extension Support for gcc-4.8.3
Jim MacArthur
jim.macarthur@codethink.co.uk
Wed Mar 9 10:41:00 GMT 2016
On 08/03/16 17:45, Jerry DeLisle wrote:
> On 03/07/2016 04:10 PM, W Spector wrote:
>> Allowing $ in variable names was an old, old, ('60s/'70s) IBM mainframe
>> extension, and maybe others of the era too. I first encountered it in 1978 or
>> so. So definitely pre-VAX.
>
> IMHO for some of these things on legacy code, judicious use of editors like sed
> should be used on the source codes and just bring them out of the dark ages. It
> really is not that hard. If the code is that important then just do it.
> Hacking compilers out of laziness just does not seem right.
>
> I am not saying anyone is lazy and do not intend to offend, I fully understand
> what it is like to have over bearing workloads, but we should at least do a
> reality check.
>
We've investigated automatic transforms on our source code and couldn't
find any way to do it with regexes, with the exception of TYPE being
used as PRINT, which we did manage to transform quite easily. Everything
else we've found needs more context, and some things (like UNION & MAP)
are impossible. (If you were just talking about '$' though, I can't say
I've encountered that).
Making the source code standards-compliant is the correct solution, no
doubt about that. However, we have users who are paying what I imagine
is quite a lot for proprietary compilers and so are well motivated to
get away from them but don't feel they can fix up all their source to be
standard compliant. Hence, we maintain a fork of GCC with our own set of
DEC & Sun extensions which overlaps somewhat with these patches Fritz
has sent. This is the most practical solution we've got at the moment.
We're very happy to send in patches for these if there's a general
consensus that legacy features are wanted.
In the meantime I'm very grateful to Fritz for producing this set and I
will review it while testing it out on our code.
More information about the Fortran
mailing list