On Thu, Jan 12, 2023 at 02:31:12AM +0000, Jerry DeLisle via Fortran wrote:
> Hi all,
> 
> I spotted this today on the Fortran-Lang Discourse.
> 
> It would not be setting precednce for us to allow an extension and turn
> this into a warning with -std=gnu and an error of strict compliance is
> wanted.
> 
> https://fortran-lang.discourse.group/t/error-the-leftmost-part-ref-in-a-data-ref-cannot-be-a-function-reference/4990
> 
> I will create a PR and chase this one if concurrence here.
> 
> Opinions?
> 

gfortran's current behavior is standard conforming.  Personally,
I think this should not be implemented in gfortran.  If you do
scratch the itch, then please hide it behind some option such as
-fallow-nonconforming-Fortran-leftmost-part-reference-function-component.
Please, do not enable it under -std=gnu (which should be deprecated
in favor of -std=f2018 and then -std=f2023).  Putting it under -std=gnu
would imply that it will be supported in future versions of gfortran
and would need to support whatever is implemented now and whatever
might get standardized in the future.

I'll send end by noting that there are several unimplemented F2018
features and F2023 will be approved in the April-ish timeframe.

-- 
Steve

Reply via email to