Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28794 Discussions

How can I make the VS integrated compiler ignore type mismatches in subroutine calls?

EricPrebys
Beginner
1,062 Views

 

I'm compiling some VERY old legacy FORTRAN code.  The last compiler it successfully ran under was MS FORTRAN5.1, which won't run on anything newer than Windows XP.

There's a lot of bad coding, but it does work, so I'd like to get it working on a new machine.  I've found that the Intel compiler is much more forgiving than the GNU compiler, and I was able to get it to compile at the command line with just a few fixes (would have taken literally hundreds to get it to work with GNU). 

The problem is that to use the debugger, I switched to the integrated VS toolkit, and that has the added check of comparing the variable types in the subroutines and functions to the types used in the call, and there are a LOT of places they don't match.  Things like passing an integer array and interpreting it as a byte array in the subroutine.  VERY sloppy, but I think it actually does what I want if the compiler will allow it to compile. 

 

My question is, is there any option to make it not check for this, or to turn the Errors into Warnings?  It would really save me a lot of time.

0 Kudos
4 Replies
jimdempseyatthecove
Honored Contributor III
1,027 Views

Try option /warn:nointerfaces

Expect to get what you ask for.

Jim Dempsey

 

EricPrebys
Beginner
976 Views

Thanks.  I think that's on the right track.  I was able to make the error come and go by toggling that option on the command line.

 

Now I have a stupid question: how do I change this in Visual Studio?  I see the /warn:interfaces option under "command line" (attached screenshot), but that's not editable.  I don't see how to change it under any of the option menus.

 

I'm really a newbie at VS, so any help is appreciated.

 

 

0 Kudos
andrew_4619
Honored Contributor III
950 Views
Where you see the command line to be used the dialog has several categories of options and under on of those you will find a list of diagnostic that are set or not that build the command line
0 Kudos
jimdempseyatthecove
Honored Contributor III
941 Views

In your screenshot, the lower-right box is an edit box. Enter the additional options in there (on option per line).

(do this for each configuration)

Jim Dempsey

 

0 Kudos
Reply