From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9CC033858D28; Sat, 24 Sep 2022 01:21:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CC033858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663982492; bh=FzZQ2wRePYNI8mxLlx4uiajy3Co2b8x2S3SjsJRqiaU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YYwjI3AE7LXjKuzBUlITB8c4kFOW3XEo92giD78rGW38R3J6srU2Rg5BRm+UwPhv/ Q4BLUuhqHmZpwAWEOjNJVediXb9F9vb8sXwYg1uGWpDh9cfqU86m2fx+cv/FcDLN9c ELtzP2ZoWTeYUttOVgpWWkHORIjJ1tL3fLIcD3pc= From: "neoxic at icloud dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106939] Linker-defined symbols are stained due to 'array subscript is partly outside array bounds' warning Date: Sat, 24 Sep 2022 01:21:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: neoxic at icloud dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D106939 --- Comment #8 from Arseny Vakhrushev --- Thank you, Jakub! I have read that section and can see that the Standard is just very cautious about the cases it doesn't cover labeling them as "undef= ined behaviour". The most likely reason is memory segmentation. Comparing two pointers that point to different objects located in different memory segmen= ts make no sense. But taking into account that the times of segmented memory a= re long gone for the average C programmer, it is save to assume that no additi= onal action is needed to fool the compiler.=