[Bug c/107081] ctime fct used twice in printf
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 29 01:39:09 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107081
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
ctime returns the same pointer no matter what. It
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf
The ctime function returns the pointer returned by the asctime function with
that
broken-down time as argument.
"Execution of
any of the functions that return a pointer to one of these object types may
overwrite the
information in any object of the same type pointed to by the value returned
from any
previous call to any of them and the functions are not required to avoid data
races.
"
More information about the Gcc-bugs
mailing list