From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 82B193858D28; Thu, 29 Sep 2022 01:39:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82B193858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664415550; bh=MP75tRckinz7L98ILIubMXhV3EhvdYKGQdEWgrOkIkQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dg4pwtsyjGjRWfApBbyatwv7/0pmNV8V4npoiOUnVRUNZIy1IGSPlk8mfH+ciassA Cutfm613hsIKjP/veSCgPqK1m59q9gTucdUX9U2EfREMOz70VZc8dlLYPrnz9ihdGq Zz9BGFmmgDBHsuITwlVzRqWs+mN5iJGDza0vTSl0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107081] ctime fct used twice in printf Date: Thu, 29 Sep 2022 01:39:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107081 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski --- ctime returns the same pointer no matter what. It=20 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 da= ta races. "=