Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

"field width is too small" warning

gmorris
Beginner
869 Views
How do people feel about the "field width is too small" warning, as currently implemented? I find it slightly annoying that:

write(*,'(f3.1)') 1.0

triggers: "Warning... The field width is too small for the number of fractional digits"

Well, no it isn't. It would be if the argument were negative, but otherwise it's fine.
"field width MAY be too small" would be more accurate, though probably equally annoying! I can't find a "-warn" option to disable just this form of warning.

(Version 9.0 Build 20050430Z Package ID: l_fc_p_9.0.021)
0 Kudos
3 Replies
Steven_L_Intel1
Employee
869 Views
Hmm. First, you get this warning only if you have asked for standards checking. I can't find a justification for this warning in the standard, though I suppose one could argue that if the value were negative, you'd have a problem. Still, this is not the type of thing that the compiler is required to detect, and it does seem a bit aggressive to me. I'll see what others here think.
0 Kudos
Steven_L_Intel1
Employee
869 Views
The opinion around here is that the warning is appropriate.
0 Kudos
gmorris
Beginner
869 Views
OK, thanks for considering this.
0 Kudos
Reply