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: RFC: Change behavior of -std=f95 and -pedantic


Steve Kargl wrote:
On Mon, Dec 05, 2005 at 09:34:02AM +0100, Fran?ois-Xavier Coudert wrote:
Example: my own PhD code, which I wrote myself, is (I believe)
completely legal F95. I let simulations run for weeks and sometimes
months and, even if there is a checkpoint/restore mechanism in place,
I would not like my code to error out on the last step (final I/O, for
example) of a one-month-and-a-half simulation, for an extension in a
code path rarely used in my code. I would be very upset, and angry
against the compiler developers (especially if that happens inside my
checkpoint/restore mechanism).

The Fortran community is such that we will have such users like me,
and we have to plan their reaction (plus, it's changing behaviour from
previous versions).

The above scenario can't happen because the user will have read
the documentation that -std=f95 will yield fatal compile and
runtime errors on nonconforming code. Thus, the user, if she
doubts the quality of her code, will not use -std=f95 for production without testing.


Of course, we know users read the provided documentation. ;-).

*attempts to stifle laughter* *fails to do so*

Admittedly, I think it's fair to say that one should not use _anything_ for production without testing first. But FX did reference a "rarely used code path" that might not have showed up in the tests, and we all know that it's not always the times when we doubt the quality of our code that it ends up biting us.

I can live with

-std=f95           --> compile time fatal errors and runtime warnings.
-pedantic -std=f95 --> compile time and runtime fatal errors.

although I personally think -std=f95 should be equilavent to
-pedantic -std=f95 case.

Would there then be a method of getting compile-time fatal errors and runtime warnings, if those two were equal? That is, an option set that I can use habitually which will provide maximum debugging assistance when I can easily do something about it (compile-time) but does not risk breaking a long-running calculation unless its necessary because the compiled program doesn't know what to do?


Personally, I think it's valuable to encourage people to use -std=f95 as a habitual flag all the time. And thus I think it's very important to make it so that it won't come back to bite people with "unnecessary" fatal errors at runtime (unless they explicitly ask for them).

Thus, I support the proposal that -std=f95 produce runtime warnings, not fatal errors.

- Brooks


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