From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8D29438618A8; Thu, 21 Dec 2023 02:07:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D29438618A8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703124443; bh=aoajWgevQodvyuRGTR2BHtv2S7TGpRifMuo7qq10hlg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=R4FhXIVNnBfEP383Z3ekaEXRFEuWfbmIV4TsSBU4D4gNzcg1e4pw66ObLiZAdiEbd RKwHhw2BcS3+ug0sdDTlogSs+SFK+xK1m/jlEesP3OvYfDKbfSl7bomBB6AOuCW8xg K2WLy3Bhwaar2AMDsjyxVuGdFrjNhooj8joMM/Dw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/37722] destructors not called on computed goto Date: Thu, 21 Dec 2023 02:07:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.3.2 X-Bugzilla-Keywords: documentation, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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=3D37722 --- Comment #7 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:4d9e0f3f211c8c459f285b5cddabc9958ad170f8 commit r14-6765-g4d9e0f3f211c8c459f285b5cddabc9958ad170f8 Author: Jason Merrill Date: Wed Dec 20 13:58:16 2023 -0500 c++: computed goto warning [PR37722] PR37722 complains that a computed goto doesn't destroy objects that go = out of scope. In the PR we agreed that it never will, but we can warn about it. PR c++/37722 gcc/ChangeLog: * doc/extend.texi: Document that computed goto does not call destructors. gcc/cp/ChangeLog: * decl.cc (identify_goto): Adjust for computed goto. (struct named_label_use_entry): Add computed_goto field. (poplevel_named_label_1): Add to computed_goto vec. (check_previous_goto_1): Dump computed_goto vec. (check_goto_1): Split out from check_goto. (check_goto): Check all addressable labels for computed goto. (struct named_label_entry): Add addressed field. (mark_label_addressed): New. * parser.cc (cp_parser_unary_expression): Call it. * cp-tree.h (mark_label_addressed): Declare it. gcc/testsuite/ChangeLog: * g++.dg/ext/label15.C: New test. * g++.dg/torture/pr42739.C: Expect warning.=