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, OOP] PR 47978: Invalid INTENT in overriding TBP not detected


Janus Weil wrote:
Update: Here is an extended version of the patch, which adds a few
additional checks:

The patch still regtests cleanly. Ok for trunk?

+      switch (compval)
+      {
...
+	default:
+	  gfc_internal_error ("check_dummy_characteristics: Unexpected result "
+			      "%i of gfc_dep_compare_expr", compval);
+	  break;
+      }
+    }

I think we really should move to enum.


+	  gfc_error (strcat (err, " of '%s' at %L with respect to the "
+			     "overridden procedure"), proc->name,&where);
  	  return FAILURE;

That's extremely unfriendly to translators; additionally, using
("%s of '%s' ...", err, ...
you could avoid calling strcat. That way one also avoids problems like exceeding the length of err.


How about something like
"Argument mismatch for the overridden procedure '%s' at %L: %s"
which is easier to translate - and might be also easier to understand for a user.


Otherwise, the patch looks OK.

Tobias


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