------- Comment #5 from burnus at gcc dot gnu dot org 2009-04-07 13:43 ------- Many compilers support $ signs as extension (ISO standard Fortran does not). However, only a few support a leading $ sign. One of the questions which immediately come up, which data type is $foo (implicit typing).
I think the issue had come up before and the PRs were closed as wont-fix. This can of cause be reconsidered, but implicit typing is a real issue here. (In reply to comment #2) > As I already said, I have code, being compiled with MS Fortran, that has > a lot of variable names starting with $. MS Fortran allows it. My personal > opinion is that the Fortran compiler's primary use is support of the legacy > code. That means that the implementation of any extension > or even strange behaviour of existing compilers could be useful and will > save hours of hard work. Forcing standards on existing code is illogical. I full-heartedly disagree. I think the primary point of a compiler is to be standard compliant. It does not help if I have to use extension A with compiler B and C, but extension E with compiler F while compiler G does not have a feature at all and H's syntax is like B's but it does something differently. - My impression is that nowadays all compiler vendors and most of the compiler customers think likewise. (Still, supporting some old vendor extension is seen as important by both.) There exists enough newly written software, updated and also old software which is standard compliant - and thus also requires that the compiler is compliant. Having said that I don't oppose to suppose vendor extensions, given that they (a) don't clash with the standard [though difficult to predict with regards to the future standards], (b) are reasonably widely used and (c) cannot easily be replaced by something standard conform. (The [long-term] implementation burden can be potentially large even for a seemingly simple addition.) For '$' as first (!) character I think (a) is fulfilled, (b) and (c) probably not. I think gfortran does fairly well in this regard compared with other compilers, except of DEC structures all major extensions should be there. One big issue with vendor extensions is that there is a huge number of them - and some even conflict with each other! Do you want to support the one of Microsoft, or of IBM, or of Intel, Digital, Sun, SGI, Cray, Pathscale, Portland Group, Absoft, Fujisu, g77, f2c, ...? And for vendor X - the of of version 4.0 or the one of 5.0 or ...? > implementation of [...] even strange behaviour [...] will save hours of > hard work. I sincerely doubt that. I think it will cause a lot of time for application developers and will lead to strange bugs. Relying on strange behaviour can also bite you if it was unintended and was then fixed in a new version of the same compiler. Nevertheless, one can re-consider the $ but the implicit typing issue has to be solved. It would help if you could make a survey (e.g. based on the documentation) and see how the few other compilers, which support it, are handling that. (I think IBM does, the xlf90 documentation could be a starting point.) By posting the result you show (a) how implicit typing is handled which is essential, (b) you proof that that is a feature supported by several vendors and (c) you show that you are really interested in that feature. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39670