This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libfortran/47285] G format outputs wrong number of characters when decimal supplied in literal


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47285

--- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2011-01-22 13:53:52 UTC ---
Created attachment 23076
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23076
A possible patch

This patch seems to be acceptable.  I add a try return value to output float to
communicate when the field width is not successful. Oddly, I had to make an
adjustment to the exponent width to take care of a case that returns
successfully.

  if (e > 4)\
    e = 4;\

This seems to work, but I wonder if I have a latent bug within. This patch does
regression test OK. I thought I would let others play with it before I submit.


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