From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id AE7213858C60 for ; Thu, 14 Mar 2024 20:46:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE7213858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AE7213858C60 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710449189; cv=none; b=D7FdQiAydpbAjHfbQDUsQv5QPmTKbnYcQIodp2pWqUJonOxHB77RT9xZiP/tT16cj+AoCbrz0LGt20l23NchA8LijjikV4JA80H0c1B/83tyKur8eBANSdYPF4mkoyxhUKycu7lnIo7Vg0BqWRnf1OokTC5rSJzFWTaGXjIAqjQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710449189; c=relaxed/simple; bh=MyCDtsEnLcq0mZlz4kIm9Fn+Xw9mS+esNmpH2OFSRFE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=x8ggqTuCC6IOQ8z4dikDO0r9tm4HAKGeBGmwNdEtD2/srctt29e6ifLt1Eph1rhQvbeFVTkkGokKvQFjv4Zgi/MiIwUjmVYhwZSUJ8/u8VSY1bliQvfxBjFXlaqTEliTrSpr5O+6U7eVg1lcJBhyb5WFx6UsJ+UwywH5U9QzCT4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710449187; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=I6/3krsLpyFzsxxA1kPVjr4k16aTjYIc1TI6mVFNcTU=; b=UpDrlG2xkL+TiqG0z8zWF2zhwjW2H+idbquMQP+NQsPnuzLu3D1p3U34TDeEyFQSj5KcE/ +rl5wZrbQY/XWS8y5Lxbaudk78vktZXzjI/LjuTtc7ezhysNGxpc6n1+q2BLAJjVGoEkoO 2p6qEgAUXdV7KYHhRfc0Cpg5m2tzJSc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-W5ueiPZhPFaixbB211GG_g-1; Thu, 14 Mar 2024 16:46:25 -0400 X-MC-Unique: W5ueiPZhPFaixbB211GG_g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D43E18007A3 for ; Thu, 14 Mar 2024 20:46:24 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.225.36]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9ABA3202451F; Thu, 14 Mar 2024 20:46:24 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 42EKkM7M3776401 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 14 Mar 2024 21:46:22 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 42EKkMk23776400; Thu, 14 Mar 2024 21:46:22 +0100 Date: Thu, 14 Mar 2024 21:46:22 +0100 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH RFA] tree-core: clarify clobber comments Message-ID: Reply-To: Jakub Jelinek References: <20240314202813.2942950-1-jason@redhat.com> MIME-Version: 1.0 In-Reply-To: <20240314202813.2942950-1-jason@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Mar 14, 2024 at 04:27:22PM -0400, Jason Merrill wrote: > OK for trunk? > > -- 8< -- > > It came up on the mailing list that OBJECT_BEGIN/END are described as > marking object lifetime, but mark the beginning of the constructor and end > of the destructor, whereas the C++ notion of lifetime is between the end of > the constructor and beginning of the destructor. So let's fix the comments. > > gcc/ChangeLog: > > * tree-core.h (enum clobber_kind): Clarify CLOBBER_OBJECT_* > comments. LGTM. > diff --git a/gcc/tree-core.h b/gcc/tree-core.h > index 8a89462bd7e..654d182b1c3 100644 > --- a/gcc/tree-core.h > +++ b/gcc/tree-core.h > @@ -993,9 +993,11 @@ enum clobber_kind { > CLOBBER_UNDEF, > /* Beginning of storage duration, e.g. malloc. */ > CLOBBER_STORAGE_BEGIN, > - /* Beginning of object lifetime, e.g. C++ constructor. */ > + /* Beginning of object data, e.g. start of C++ constructor. This differs > + from C++ 'lifetime', which starts when initialization is complete; a > + clobber there would discard the initialization. */ > CLOBBER_OBJECT_BEGIN, > - /* End of object lifetime, e.g. C++ destructor. */ > + /* End of object data, e.g. end of C++ destructor. */ > CLOBBER_OBJECT_END, > /* End of storage duration, e.g. free. */ > CLOBBER_STORAGE_END, > > base-commit: 5c01ede02a1f9ba1a58ab8d96a73e46e0484d820 > -- > 2.43.2 Jakub