------- Comment #1 from burnus at gcc dot gnu dot org 2010-07-29 19:33 ------- Created an attachment (id=21355) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21355&action=view) Draft patch
Jerry, what do you think? Note: The smallest width is actually 3 also for D and E: That's enough to fit INF or NAN - but the smallest useful width is slightly larger - and tested for. I also added a check for the E* and D edit descriptor that "d" is positive; it is not explicitly written in the standard, but it does not make sense to allow 0. ifort is strictly standard conform - and prints always '****' while NAG and gfortran always give a run time error. Thus, I think it is sensible to check whether d is positive - and print an error otherwise. (Again with "d == 0" one could fit a NAN and INF in there, thus, strictly speaking one should allow it - but I maintain that no sensible user will ever need this - and gfortran lacks the run-time support for it.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45129