This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] PR 33141: Better diagnostics and handling of intrinsics with -std=* settings


FX wrote:
Hi Daniel, hi all,

Hi FX,


I'll try to answer the questions despite the check-in and please send your comments for a small update patch if we agree:

1. What do -fall-intrinsics and -Wintrinsic-shadow do when used together? I suspect their behaviour is close to that of -Wintrinsics-std, isn't it?

No. This combination will warn about a user-procedure having the same name as any intrinsic available, like:


FUNCTION asinh (arg)
1
'asinh' at (1) is also the name of an intrinsic; explicit interface or EXTERNAL might be needed to call it (message sketched).


-Wintrinsics-std will warn on the *call* of an intrinsic that is not in the standard (thus, -fall-intrinsics will obsolete -Wintrinsics-std):

PRINT *, asinh(1.)
1
Intrnisic 'asinh' is not in the standard and 'asinh' is treated as if declared EXTERNAL.


(Thus, for those two code-snippets combined, the FUNCTION will be called.)

2. Why is -Wintrinsic-shadow the only "intrinsics" option that has the singular form used? I think the plural would be fine there.

Actually, I dislike -Wintrinsics-std more (as below); however, I believe -Wintrinsics-shadow-allstd is not what it does, see above. And I couldn't think of a good name here, but am open for suggested changes :)


The singular here is, well, just my first idea of the name. But I think it fits quite good, as a single intrinsic is shadowed... But here I'm also open for name suggestions, of course.

3. I don't quite like the name of "-Wintrinsics-std", because I don't see how it's linked to what it does. The one name I could think of is -Wintrinsics-shadow-allstd, but other people might have ideas.

See above.


Otherwise, your revised patch seems OK. Please remember to update the "New features" page, as it's otherwise harder when the release comes to write release notes without forgetting anything.

Done, at the moment with the option names as checked in.


Thanks for the comments,
Daniel


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