[Patch, fortran] PR40054 and PR63921 - Implement pointer function assignment - redux
Paul Richard Thomas
Mon Sep 28 19:04:00 GMT 2015
>> * io.c (next_char_not_space): Change tab warning to warning now
>> to prevent locus being lost.
> This has disappeared?
> I think that for better error reporting (avoid unclassifiable statement),
> the gfc_notification_std can be dropped, as there is a specific
> gfc_notify_std guarding resolution.
That's true - I'll check it out right now.
> Same for the rest of the condition. gfc_match_ptr_fcn_assign carrefully
> restores existing errors upon failure, so I would rather use it more often.
> So, can you try removing the condition completely (and use the match macro
> above again)? that should improve errors in ptr_func_assign_2, and
> hopefully not regress.
> If it does regress, let's keep it as is.
It does regress - that's why it is the way it is. Fortunately,
MATCH_ERROR for statement functions would produce pretty much the same
result in pointer function assignments. The regression is in
recursive_statement_functions.f90, which just gets hopelessly tangled
up in error recovery.
> Nit: Usually, we don't put the 'F2008:' prefix.
> Also may be explicit a bit more: "function result as assigned-to variable"
> or something alike.
Nits or not, they are good points :-)
> Anyway, those are nits, and the rest looks good to me.
> So, with the above comments, the patch is OK as far as I'm concerned.
OK - I'll try to do the honours tonight.
Thanks for the reviews.
More information about the Gcc-patches