This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45308] [F2003] DATE_AND_TIME does _not_ black-pad strings
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Aug 2010 13:19:23 -0000
- Subject: [Bug fortran/45308] [F2003] DATE_AND_TIME does _not_ black-pad strings
- References: <bug-45308-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2010-08-17 13:19 -------
(In reply to comment #1)
> Created an attachment (id=21504)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21504&action=view) [edit]
> gcc46-pr45308.patch
That's quick.
However, I wonder whether one should modify more, e.g. if SNPRINTF is
available, writing directly to __time instead of writing to a temporary - and
then call memset to pad the rest instead of copying the data. On the other
hand, date_and_time does not seem to be that time critical.
(Additionally, one should update the F95 comment before the function to match
better that one now used the F2003 version which does padding.)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|DATE_AND_TIME does _not_ |[F2003] DATE_AND_TIME does
|black-pad strings |_not_ black-pad strings
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45308