This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/4177: in printf only first call to asctime(localtime(..)) is evaluated
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, joachim dot wuttke at icn dot siemens dot de, jwuttke at ph dot tum dot de, nobody at gcc dot gnu dot org
- Subject: Re: c/4177: in printf only first call to asctime(localtime(..)) is evaluated
- From: aoliva at gcc dot gnu dot org
- Date: 31 Aug 2001 12:07:34 -0000
Synopsis: in printf only first call to asctime(localtime(..)) is evaluated
State-Changed-From-To: open->closed
State-Changed-By: aoliva
State-Changed-When: Fri Aug 31 05:07:34 2001
State-Changed-Why:
asctime() returns a pointer to a statically allocated area. You call it twice before pritnf has a chance to use the value written after the first call.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4177&database=gcc