From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CA022385B533; Fri, 17 Feb 2023 07:54:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA022385B533 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676620498; bh=+4A2gqWAUDiLPqZNfH1AUJQrrzcCyYyC+gjg8tef2EI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=K1NuMsXtZ76guIgc00mLvQivOu+EOHRLJ/4DwAi2KnRgX3j6RDFgw02eMfp/u2us3 xo5GxniVhttMLjiII+loN6Cdyt9S5qOKNSwbfResH7G1yJJt3gvQW3lj0QEAbR9Tek MrtkixmNSd8+kfzq220PvO91bC292Fim6UqLptfg= From: "aoliva at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/77760] get_time needs to set tm_wday amd tm_yday Date: Fri, 17 Feb 2023 07:54:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 7.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aoliva at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: 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=3D77760 --- Comment #8 from Alexandre Oliva --- https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612198.html has a simple-minded implementation, that should make it clear what I mean by scra= tch: get() pays no regard to the incoming bits in tm, it initializes them with a zeroed-out state. Now, I realize that do_get, if called by a derived class with an uninitiali= zed tm, might do weird things, because it would take some of those bits as stat= e.=20 Is this something of concern? As in, how internal and reserved for the implementation is the intermediate state of tm between get and do_get?=