- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When I compile the attached program, the following messages are displayed:
warning #6075: The data type of the actual argument does not match the definition.
warning #5448: In the call to SUB1, actual argument #1 does not match the type and kind of the corresponding dummy argument.
Does anyone know why this is just a warning and not an error? I made a similar test where I passed real variables that had a different kind, and there was an error as expected.
Roman
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a warning because a lot of people do this deliberately and we support it as an extension. It can be safe in many cases for integer arguments on little-endian systems (such as X86), but it's not safe for reals.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. I understand now that it can be safe in some cases. Are you saying that this is an Intel extension to Fortran? I did try compiling the code with /stand:f03 /warn:stderrors and I got the same warnings as before. There was no indication in the compiler output that this was an extension.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is an extension, yes, but not an extension to "numbered syntax rules and constraints" that get standards warnings. Basically, we told you there's a problem, it's up to you to decide what to do about it.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page