>>> Thus, I think one should be strict about the requires-explicit-interface >>> diagnostic (= new code, using F90+), but for interface mismatch (= could >>> be >>> old Fortran 66 code), it should be either disabled or - as currently - >>> just >>> be a warning. >> >> How about enabling it by default, but having -std=legacy disable the >> checks? > > Hmm, I think I'd prefer to have for the arguments only a warning with > -std=gnu - except for the function result value, which should always be an > error. And also the "requires an explicit interface" checks should always > use an error.
Why the distinction (apart from: NAG does it this way)? The nice thing about the current patch is that it just relies on the full machinery of "gfc_compare_interfaces". Making distinctions about where to give an error or warning probably requires again a certain amount of code-duplication from interface.c. Or do you see a technically simple way to do this? > However, if one goes for an error with -std=gnu, the error should explicitly > mention that "-std=legacy" disables the error. At least I do not recall all > the special flags which enable certain features, nor whether such a flag > exists at all. And I doubt that a normal user do. That's right. Might be worth to add it. Although the folks which operate such 'dirty' legacy codes hopefully know about the usefulness of -std=legacy ... Cheers, Janus