This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] Warn about integer**(negative integer)


> 2017-01-22  Thomas Koenig  <tkoenig@netcologne.de>
> 
>        * arith.c (arith_power):  If simplifying integer power expression
>        to zero, warn if -Winteger-division is given.
> 
> 2017-01-22  Thomas Koenig  <tkoenig@netcologne.de>
> 
>        * gfortran.dg/integer_exponentiation_7.f90:  New test.

The idea seems reasonable, but I am not sure about the wording (“truncated” in particular). “Integer exponentiation truncated to constant 0”? Why not “Negative integer exponent has result value zero”?

Other than that, OK to commit.

FX

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]