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

Re: [Patch, Fortran] Parsing and checking of type-bound operators


On 08/08/2009 03:37 PM, Daniel Kraft wrote:
> The locations errors by gfc_check_operator_interface are associated to
> seem a little confused to me...  I don't think that messages like
> "should be a FUNCTION/SUBROUTINE" should be at the procedure's
> definition but rather where the procedure is defined as operator [...]
> For type-bound operators, it's the same (as the same code is used) --
> see the test-case for details.  I suggest to open a PR for this
> (namely making error locations with operator interfaces more
> consistent), but take it for now as this patch does it.
I concur. Please fill a PR.


+      gfc_warning ("Type-bound operator at %C parsed, but calls to those are"
+		   " not yet implemented.");


I am not really happy about this warning. One can easily create a
program, which compiles but does not do what is expected as the wrong
operator will be called (as warnings are easily missed).

Thus, in principle, I would prefer an gfc_error here. However, I am
willing to accept a warning if the actual function is planned to be
implemented soon and if the warning is turned into an error when the
implementation misses the 4.5 release (regression PR as tracker).

> No regressions on GNU/Linux-x86-32.  Ok for trunk?
OK. Thanks for the patch!

Tobias


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