- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
the standard conformance diagnostics can sometimes be confusing. Example:
[fortran]
subroutine foo (i, k, m)
integer :: k
integer(1) :: i, m(3)
k = min (k, i) ! Useful warning
k = min (k, maxval (m)) ! Confusing warning
end subroutine foo
[/fortran]
% ifort ifort-confusing.f90 -stand -c
ifort-confusing.f90(4): warning #7374: F2003 standard requires all arguments be of the same type and same kind type parameter.
k = min (k, i) ! Useful warning
--------------^
ifort-confusing.f90(5): warning #7374: F2003 standard requires all arguments be of the same type and same kind type parameter. [MAXVAL]
k = min (k, maxval (m)) ! Confusing warning
--------------^
(a) One might mention the name of the intrinsic affected (here: MIN);
(b) MAXVAL is not the problem, it just happens to be used in the code... :-)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Harald,
I have filed a feature request to improve the diagnostic mesage for this case. The issue number is DPD200243638
Annalee
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page