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: test for the MOD() intrinsic


On Nov 28, 2005, at 1:35 PM, Uttam Pawar wrote:

According to f95, the second parameter can be 0 (zero), and if that is
the case then the result is processor dependent. While, f2003 says, the
second parameter can not be zero.

Intriguing. And puzzling. A quick glance verifies that you are correct about the difference, but I find this surprising in that it looks to me like an incompatibility - that is valid f95 code is not necessarily valid f2003 code. I would have expected an incompatibility like that to be listed in 1.6.1 of f2003 as an f95 incompatibility. Makes me wonder whether perhaps f95 was changed by an interp.


Ah... Additional data. Though this isn't listed in 1.6.1, it *IS* listed in 1.6.2 as an f90 incompatibility. This implies to me that f95 and f2003 are the same, but f90 (and earlier) were different. I take that as additional evidence that this must have been changed in an f95 interp. Hmm. I've got to run pretty quickly, but lets see if I can track down the interp. That would have to be one with edits, which would mean it would show up in a corrigendum, which makes it a lot simpler to find as there are only 2 or 3 f95 corrigenda...

Yep, there it is in f95 corrigendum 2, resulting from f95 interp 87. And yes, that same corrigendum also adds it as an f95/f90 incompatibility.

So my conclusion is that if you want to support both variants depending on the -std= setting, f95 and f2003 are the same, with f90 being different.

--
Richard Maine                |  Good judgment comes from experience;
Richard.Maine@nasa.gov       |  experience comes from bad judgment.
                            |        -- Mark Twain


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