This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/36361] attribute declaration outside of INTERFACE body



------- Comment #2 from janus at gcc dot gnu dot org  2008-05-28 22:56 -------
A related problem also occurs with the POINTER attribute:

interface
  real function bar()
  end function bar
end interface

pointer :: bar

Here I'm not really sure if it is forbidden, because one could interpret this
as a procedure pointer. g95 gives the same error message as with DIMENSION (see
above).

Assuming it is not forbidden, one would still have to distinguish it from:

interface
  function bar()
    real, pointer :: bar
  end function bar
end interface

This code clearly is valid (declaring a pointer-valued function).


-- 


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


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