This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40054] [F08] Pointer functions as lvalue
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 3 Jul 2011 15:44:25 +0000
- Subject: [Bug fortran/40054] [F08] Pointer functions as lvalue
- Auto-submitted: auto-generated
- References: <bug-40054-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40054
--- Comment #7 from janus at gcc dot gnu.org 2011-07-03 15:43:39 UTC ---
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?