- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting compiler warning
"Routine PARSETAG called with different number and/or type of
actual arguments in earlier call - C attribute required if intended"
on a situation like the following:
integer function f(a, b, c, d) result(u)
integer a
integer b
integer c
integer, optional :: d
u = 0
end function f
integer function g() result(v)
integer, external :: f
v = f(1,2,3)
end function g
integer function h() result(w)
integer, external :: f
w = f(1,2,3,4)
end function h
The issue seems to be in the proper usage of optional arguments.
How do I resolve this?
"Routine PARSETAG called with different number and/or type of
actual arguments in earlier call - C attribute required if intended"
on a situation like the following:
integer function f(a, b, c, d) result(u)
integer a
integer b
integer c
integer, optional :: d
u = 0
end function f
integer function g() result(v)
integer, external :: f
v = f(1,2,3)
end function g
integer function h() result(w)
integer, external :: f
w = f(1,2,3,4)
end function h
The issue seems to be in the proper usage of optional arguments.
How do I resolve this?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If a routine has OPTIONAL arguments, an explicit interface must be visible to the caller.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add a trailing comma on the call in g() so that your number of placeholders is consistent.
James
James
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page