[Patch, Fortran] PR54234 - Add -Wconversion warning for CMPLX(dp,dp)

Tobias Burnus burnus@net-b.de
Tue Aug 14 09:33:00 GMT 2012


This patch adds a -Wconversion warning (enabled also by -Wall) for
   CMPLX(real, real)
if the real arguments have a higher kind number/precision as the 
default-kind of complex/real. I think most of the time, this precision 
loss is unintended; it can be silenced when using a kind= parameter (or 
-Wno-conversion).

However, if you believe that the warning is not suitable for -Wall, we 
can also hide it by only enabling it with the talkative 
-Wconversion-extra flag.

Build and regtested on x86-64-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn-cmplx-kind.diff
Type: text/x-patch
Size: 3226 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120814/fca8746e/attachment.bin>


More information about the Fortran mailing list