This is the mail archive of the gcc-patches@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]

Re: [Patch, Fortran] PR35203 - reject dummies with VALUE + OPTIONAL


Tobias Burnus wrote:
Richard Guenther wrote:
We have sorry () for this purpose (known implementation limitations).

Thanks! I was not aware of that function!


Tobias Schlüterwrote:
Please don't use gfc_error for shortcomings in the compiler.
Agreed. How about the following patch?

Is it possible to print a locus with sorry? Otherwise, I think gfc_internal_error would be preferable. After all, the user will have to change his program. I thought we had something for this purpose, like gfc_unimplemented, but I couldn't find it.


+      /* TODO: The Fortran standard allows to use both VALUE and OPTIONAL;
+	 as the presence of optional arguments is currently checked by
+	 comparing the argument (pointer) with NULL, this fails with
+	 VALUE. The fix is to use a hidden argument.  See PR35203.  */

Jsut a little more bikeshedding :) the fix is not necessarily to use a hidden argument, see my comment in the PR.


Cheers, and thanks,
- Tobi


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