Re: XL Fortran on PowerPC- or x86-arch
- From: nospam@xxxxxxxxxxxxx (Richard E Maine)
- Date: Fri, 24 Feb 2006 15:29:53 -0800
Thomas C. Lang <tcl@xxxxxx> wrote:
format descriptors without field-length.
If you find *ANY* f90 compiler that does not at least have an option to
complain about a missing field length in an edit descritor in a format
statement, submit a bug report to the vendor. The standard requires the
capability to diagnose that kind of nonconformance in a format
statement. I just now tried
program me
write (*,100) 42
100 format(i)
end
with all 3 of the f90 compilers that I have on this system right now
(nag, g95, gfortran). All 3 bitched with default compiler options. No
bug reports needed there.
If the format is a character expression instead of a format statement,
the standard doesn't require diagnosis, though som ecompilers do it in
the simple and common cases (like literal constants). With the same 3
compilers, I tried
program me
write (*,'(i)') 42
end
and they also all bitched, though with different severity levels.
Or in case one uses a present()
statement and checking for the value of an optional argument in the same
if-statement.
If I have correctly parsed what you are saying there, along with your
comment about sometimes getting informed via program crashes, this error
wasn't "detected" at all. You might have run into a distinction between
whether or not the compiler short-circuits expression evaluation. That's
not a matter of being "strict" or not. That's just a happenstance of
particular implementation choices, all of which are valid. But maybe I
misunderstood, because I did have a bit of trouble interpreting that
statement.
Yes, xlf does have a reputation for being fairly strict (or "picky",
depending which slant one wants to put on it). To constructively answer
your question, the Nag compiler is also on the strict/picky side.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- Follow-Ups:
- Re: XL Fortran on PowerPC- or x86-arch
- From: Greg Lindahl
- Re: XL Fortran on PowerPC- or x86-arch
- Prev by Date: Re: A few syntax questions
- Next by Date: Re: A few syntax questions
- Previous by thread: Newline (linefeed) suppress.
- Next by thread: Re: XL Fortran on PowerPC- or x86-arch
- Index(es):
Relevant Pages
|
|