Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

implicit conversions

russell66
Beginner
416 Views
Is there a way to get the compiler to warn you when an implicit conversion is taking place.

I am in the process of modernizing a legacy code that stored many values in variables of the wrong type ( ints in reals for the most part), and would
like the compiler to help as much as possible.
for example:
INTEGER :: iVal
REAL :: rVal

rVal = 1 ! should be initialized with 1.0
iVal = rVal ! should be INT(rVal)

rVal = REAL(iVal) ! OK, but why use this stmt...

Thanks

Russ Johns
0 Kudos
1 Reply
Steven_L_Intel1
Employee
416 Views
No - implicit conversions are part of the Fortran standard. But we've had several requests for such a feature and might add it in the future as part of a set of user-settable rules.

You might look at something like the free FORCHEK tool, which can be very picky if you ask it to.

Steve
0 Kudos
Reply