[Bug fortran/40054] [F08] Pointer functions as lvalue

kargl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jul 3 16:20:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40054

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #8 from kargl at gcc dot gnu.org 2011-07-03 16:19:24 UTC ---
(In reply to comment #7)
> I think it will be very hard (if not impossible) to implement this, while
> maintaining support for statement functions at the same time. In particular,
> how is one supposed to interpret a statement like:
> 
> f (x) = x + 1
> 
> Is this a statement function declaration? Or rather an assignment to the result
> of a pointer-valued function f, which is defined further down the road? In many
> situations this seems to be indistinguishable (or one can only decide it at
> resolution stage, where the function f has been parsed already, if it is
> there). Or am I missing some restriction in the standard?
> 
> In any case, statement functions are obsolescent since F95, so would it be an
> option to not support them with -std=f2008?

Obsolescent does not mean deleted.  Unfortunately, statement functions
are still valid Fortran.



More information about the Gcc-bugs mailing list