See: http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/12ac1683f64da0b8 ! type t_a is public; type t_b is private interface operator(+) module procedure add_t_a, add_t_b end interface contains pure function add_t_a(a1,a2) result(a) type(t_a) :: a type(t_a), intent(in) :: a1, a2 pure function add_t_b(b1,b2) result(b) type(t_b) :: b type(t_b), intent(in) :: b1, b2 Using NAG the output is: Extension: Dummy B1 of ADD_T_B in generic + exposes PRIVATE type T_B (Extension == Fortran 2003.)
Comment from Richard Maine: > There were a bunch of restrictions like this that were removed with one > of the Fortran revisions. I think it was between f95 and f2003. So in > some sense, both compilers are right. You might want to look at the > particular compiler options for controlling the version of the standard > that messages are produced for; some compilers have multiple options > there. > > It is my opinion that these restrictions were misguided in the first > place. They achieved nothing useful and disallowed otherwise reasonable > coding practices. I think that a majority of J3 eventually came to agree > with that. AT any case, they did agree with removing the restrictions in > f2003. Am I correct to understand that an error should be emitted with -std=f95, but not with -std=f2*? If yes, would it be a majore offense to keep the present gfortran behavior? Is there a way to document it?