This is an archive of the discontinued LLVM Phabricator instance.

[flang][f18] Replace `-fparse-only` with `-fsyntax-only`
AbandonedPublic

Authored by awarzynski on Feb 1 2021, 7:13 AM.

Details

Summary

-fsyntax-only is the preferred spelling for -fparse-only implemented
in the new Flang driver in [1]. It is consistent with clang and
gfortran. It was originally proposed and accepted in [2] (this
transition was announced in [3]).

This patch replaces -fparse-only with -fsyntax-only in f18
All affected tests are refactored to use the new spelling.

-fparse-only still works, but is now deprecated and triggers a
warning. It will be phased out gradually.

[1] https://reviews.llvm.org/D92854
[2] https://lists.llvm.org/pipermail/flang-dev/2020-November/000588.html
[3] https://lists.llvm.org/pipermail/flang-dev/2021-February/000646.html

Diff Detail

Event Timeline

awarzynski requested review of this revision.Feb 1 2021, 7:13 AM
awarzynski created this revision.
Herald added a project: Restricted Project. · View Herald Transcript
awarzynski updated this revision to Diff 320812.Feb 2 2021, 9:10 AM

Add a warning when using -fparse-only

awarzynski retitled this revision from [flang][f18] Introduce `-fsyntax-only` as an alias for `-fparse-only` to [flang][f18] Replace `-fparse-only` with `-fsyntax-only`.Feb 2 2021, 9:14 AM
awarzynski edited the summary of this revision. (Show Details)

I updated the description to make it clearer that this patch deprecates -fparse-only (this reflects the change in the 2nd diff).

FarisRehman added inline comments.Feb 2 2021, 9:18 AM
flang/tools/f18/f18.cpp
551

Typo of 'warning' :)

clementval added inline comments.
flang/tools/f18/f18.cpp
551

Shouldn't you output warning on llvm::errs() ?

awarzynski abandoned this revision.Feb 3 2021, 9:20 AM

Similar change was introduced in https://reviews.llvm.org/D95887