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.129.124]) by sourceware.org (Postfix) with ESMTPS id CE672385829C for ; Thu, 14 Mar 2024 20:28:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CE672385829C 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 CE672385829C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710448100; cv=none; b=GQK27paCdsZNmFs+6CetTTnJjq+YOm/OaSEq1ndVeVWsXhUBDPe6SMrdkZX8FGWM2eN35fjboqDlJVHxjz8qRfvbcqISnkqp1fodYzmkPd16+lXhHThrEs3DvNqHO8lx1o2flP5ZaickHCzuMc+2dGvehrRB9xlu8zWEaLocjEk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710448100; c=relaxed/simple; bh=XtDXqp8wehruhj6m0nwC+EAtZ2zTaABJFUmhw99+Dkc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kWQBq8dxoCtjbhuIEVFj+ysKqfWXUpgHrsFnbJRRUpDb2siCANc/D90uP26MHJPxx6C7BJhJCoxObtmdIF+y6I85ZZ4/xUXnMvipFfdNFVSNon3hjKhZ3BJBTfnII50ecwkYIdWJI48W/OEGTgsOnvUZo2sJsquCnwNZ/G211O8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710448097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3UczrtZjZLQuSQd41c+0o0t5UKQrlQCHFh68ZQMIkE=; b=b5OG41SV6IKH3uU1Ey80LigA038Nt56WUnK6s7Cj8sVu1rbUd0SGzvAsAZjZ8mKvnLQXmR 6Ezhb862SSRRyuVEGwB0IBcJexiigPggMgWtpt3xfPY4uJPWeUc77akAzMJ5PPy5sbSyOJ Dh5wez33k44lztBLlmACns0UNmX5i2U= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-211-725iqEK9Mc-HIFotHoI_tg-1; Thu, 14 Mar 2024 16:28:16 -0400 X-MC-Unique: 725iqEK9Mc-HIFotHoI_tg-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-789e29239deso36117685a.0 for ; Thu, 14 Mar 2024 13:28:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710448095; x=1711052895; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=H3UczrtZjZLQuSQd41c+0o0t5UKQrlQCHFh68ZQMIkE=; b=M+sHFljk7rhRGNE6Qhsuyjy8A2FVjBvKDADH+CIGfiqBOFxegfGFkABmBHj3BHmkdE XEjOsTPjrnRufcyZRLVeTafM/sTYHpoJA5v5u/uFOfv/o4iDEmHuGgJGzMPBKi+kgMYh 08mqxeUqSawU713D0aFswKcncc7Ehrl1shPrVWZtZeeiUJGCcH87POLznOH2goZ2kDBQ 86SbP/vKh5l9BcX+no07DFNsEaCCxmpEA5o53yrkLq4mTcLFx+JopbglHwCPkdNyBexD 6abyfolfv/5ZeuJCsKEDspNZr+MXEPMpE7a6B9X8W7fjppuTacIpkidr2vQeC0RnL983 rxLQ== X-Gm-Message-State: AOJu0YyXTVBEwKO5dqu7QJXprQPtVjNwUxwCWYf6UV9JeZFXXgwpro9C RjPBBOoxLg6e1z8SCFqjxNafzkSk+JX9jK9tqgvng6xxzjPiigf5OFXsHIowTFTQucQCo6j6hYJ EbQz/NtJsyzh0e/1iEj8eaP1k65RKf85D9MJmwn0+K7SoAAG8CTyZhscT0hGFrFQ2fAwRVFWqhM cX/t7+BTcSUn3yEM9C6BTGqGKRW1mnTcGc58A= X-Received: by 2002:a05:620a:1351:b0:789:d99f:4d7b with SMTP id c17-20020a05620a135100b00789d99f4d7bmr2681553qkl.9.1710448095332; Thu, 14 Mar 2024 13:28:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRIbUDYCe5rKQr+9VA0USDH/uDutCWayYLFR0O1I2d++X9nsCqUe+8ysntaMmYJDYtcriTKg== X-Received: by 2002:a05:620a:1351:b0:789:d99f:4d7b with SMTP id c17-20020a05620a135100b00789d99f4d7bmr2681522qkl.9.1710448094869; Thu, 14 Mar 2024 13:28:14 -0700 (PDT) Received: from jason-thinkpadp1gen4i.rmtusma.csb (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id qr3-20020a05620a390300b00789e220b7b0sm280102qkn.0.2024.03.14.13.28.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 13:28:14 -0700 (PDT) From: Jason Merrill To: gcc-patches@gcc.gnu.org Subject: [PATCH RFA] tree-core: clarify clobber comments Date: Thu, 14 Mar 2024 16:27:22 -0400 Message-ID: <20240314202813.2942950-1-jason@redhat.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.7 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: 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. --- gcc/tree-core.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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