[PATCH, Fortran] Extension: Support legacy PARAMETER statements with -std=legacy (or -fdec?)

Fritz Reese fritzoreese@gmail.com
Thu Nov 3 11:16:00 GMT 2016


On Wed, Nov 2, 2016 at 3:38 PM, Jerry DeLisle <jvdelisle@charter.net> wrote:
> On 11/02/2016 08:47 AM, Fritz Reese wrote:
>>
>> Attached is a patch for the GNU Fortran front-end which allows the
>> compiler to interpret these legacy PARAMETER statements. The patch in
>> its current form does this without warning through -std=legacy
>> (warning for -std=gnu, error for -std=f*). Bootstraps and regtests on
>> x86_64-redhat-linux.
>
> How does the behavior compare to G77 current behavior. Often we use
> -std=legacy to maintain compatibility with G77, so we do not want to break
> anything there, though I realize we can not be perfect in all cases.
>

I don't know. I don't have a copy of g77, and the code seems to have
been successfully scrubbed from the searchable internet.

I can say the Intel Fortran compiler simply accepts these parameter
statements by default. It will only warn you about it if you give it
an explicit standard on the command-line, and even then will still
interpret them as PARAMETER statements. So as far as I can tell,
legacy compilers would never interpret "parameterblah = ..." as
assignment to "parameterblah".

---
Fritz Reese



More information about the Fortran mailing list