From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0AA4A3870854; Wed, 3 Jun 2020 16:23:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0AA4A3870854 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591201427; bh=9ctvbkvY87DJVYDPojQkDLJQviOVz/EKFxGJoljwCd8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=P8UfMMlTXh+SNgJh6sBGBWzHR9/6/fnlTLavRqCwfWydv7Crbcsa6wCfZfdNC9ZYs oRIjWP2PQ0s/4JoPw5l43lqOCHT5EgvGGO5WcBJKpN6aSNr6kiUakNeexTLOlWjS9n 9GQaRFippyO8pqlqawujyXRhPKQm1QJJn52AkC1k= From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/95485] missing warning writing into function text Date: Wed, 03 Jun 2020 16:23:46 +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: 10.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: msebor 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 16:23:47 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95485 --- Comment #3 from Martin Sebor --- Ah, yes, -Wpedantic does detect the invalid conversion. But few projects u= se -Wpedantic (GCC itself doesn't) and enabling the warning in -Wall or -Wextra would likely lead to lots of noise for code that converts between object and function pointers (POSIX requires it to work). A warning implemented in a front end can also only detect questionable conversions but not the actual writes, which is what the warning I'm workin= g on does (i.e., detect stores into read-only storage).=