From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BB351386F457; Thu, 23 Jul 2020 15:01:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB351386F457 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595516460; bh=TwRk6iFO5trId9DJ+wET5WEA5pV3pwC6yyk22ghJZ10=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BcpoHjz33e1x0hb17qmNMxyoKQauYr9asSmeQa2F4gsaIK9IcT8lal3R/k4pxawdx 8yV4sgGCAEqMA3w9RP+ZdDvtP2RYbSaUWpBjWgsgsSQCI6pxcC4zJxwE+ub2sWB+Ru q5yDcrfXqUXetQAAOLjcueMkZ07A7c/TiFV14s0s= From: "lavr at ncbi dot nlm.nih.gov" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/96293] Extraneously noisy "taking address of packed member may result in an unaligned pointer value" Date: Thu, 23 Jul 2020 15:01:00 +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: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lavr at ncbi dot nlm.nih.gov 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: bug_status resolution 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: Thu, 23 Jul 2020 15:01:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96293 lavr at ncbi dot nlm.nih.gov changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID |--- --- Comment #3 from lavr at ncbi dot nlm.nih.gov --- I don't want my structure to be aligned at the int boundary. I want my structure to reflect the actual data layout "byte","byte","short","int" as = they are laid out without any gaps, and "packed" guarantees such a disposition. = I also don't want GCC issue warnings "just in case" where there's nothing happening: like I said the "short int" field is located at the native "short int" offset (multiple of 20, so there's no need for the warning; and so on = with the int field. GCC should worry only if, for example, an int is placed at = an odd offset, or, for 4 byte ints, at an offset not multiple of 4.=