[Patch, Fortran] Fix misleading error for PROCEDURE(interface) and abstract types
Daniel Kraft
d@domob.eu
Sun Sep 21 09:45:00 GMT 2008
Hi,
when compiling this program:
type, abstract :: t
contains
procedure(foobar), deferred :: x
end type t
end
(I think it is legal but not yet supported by gfortran because of the
deferred binding)
one gets "Error: Procedure with interface only allowed in abstract types
at (1)" which was ok when it was written as by then abstract types were
not implemented in gfortran; but now they are and this message is
clearly misleading for the sample program.
I propose the attached patch to change the message. I guess it is near
to obvious, but I'd like to hear your comments on the message change
anyways. Ok to commit? Or do you have suggestions for the new message?
I'll regression test and write a ChangeLog before committing, of course.
Yours,
Daniel
--
Done: Arc-Bar-Cav-Sam-Val-Wiz, Dwa-Elf-Gno-Hum-Orc, Law-Neu-Cha, Fem-Mal
To go: Hea-Kni-Mon-Pri-Ran-Rog-Tou
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080921/34d9b122/attachment.ksh>
More information about the Fortran
mailing list