This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, Fortran] Four small DEC extensions


On 10/12/2016 05:30 AM, Fritz Reese wrote:
Here I submit for review four small extensions to the GNU Fortran
frontend for compatibility with legacy code. I figure it might be a
nice change of pace from my larger patches. Never fear, for I have
more large patches to come, which I will continue to submit
one-at-a-time.

Each extension is enabled with its own compile flag, and each are
enabled along with -fdec. They are fairly self-explanatory.

1. [-fdec-feed] Treat form feed characters as whitespace.

On form feed, my first thought is don't bother with the flag. Treating it as whitspace is no big deal.

2. [-fdec-type-print] Treat TYPE as an alias for PRINT where applicable.

On TYPE, I dont like the idea of supporting this since TYPE is a Fortran STD word, If it is just an alias, Run the source through SED or use cpp. If this seems so ownerous, then just put it behind -std=legacy, no need for new flag, just make sure -std=gnu or above gives error.

By the way, you may be thinking of -fdec-all that will grab all these dec extensions, or maybe just use one for all like -fdec and not have so many flags.

I wonder if we should add a flag called -floose-as-a-goose and just turn off all checks. ;)

3. [-fdec-loc-rval] Allow %LOC() as an rvalue, equivalent to using the
LOC() intrinsic.

On %LOC(), allow with -std=legacy or gnu, give an error for -std=fxxx, no need for new flag. This is another that could be cpp or sed fixed on source side.

4. [-fdec-logical-xor] Enable .XOR. as a logical operator.


On XOR, allow with -std=legacy or gnu, give an error for -std=fxxx, no need for new flag

Feel free to comment on/question/approve each patch individually as
desired. They are attached as sequential patch files for ease of
review. Bootstraps & regtests on x86_64-redhat-
linux. OK for trunk?


Not yet, generally, I don't think we need so many compiler flags. We should probably think about this as far as the other extensions you have already committed.

Jerry



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]