From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 370273858C2C; Fri, 26 May 2023 16:39:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 370273858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685119145; bh=esojnmQA1lhGU3bRnN3Ahgno/i2aQpDTVLRDAJn0DLc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=adAOov66kT0AKtnUknafcEShWzNfAvCBBLUxEX62dAwg879TFv+srQrShUqo60ure Z6tBZK5N3RZ/vKn7OeT3K36XrcC2iqgqZnYD96++VLs/pXD8Oimo5RS9V9wOccfwHp 3oGfwv/BfgM0iFeLqHAE48xP3EkDvtq0zp2AUGsM= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109990] [12/13/14 Regression] Bogus -Wuse-after-free warning after realloc Date: Fri, 26 May 2023 16:39:05 +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: 13.1.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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=3D109990 --- Comment #6 from Andrew Pinski --- (In reply to Bruno Haible from comment #4)=20 > That is the only way of keeping track of pointers _into_ the string_space > area, when it is reallocated. How else would you want to do it? You could use intptr_t casting to do the subtraction ...=