From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C5AF83857011; Mon, 12 Sep 2022 03:16:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5AF83857011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662952579; bh=USoYkCifqo67iAJgTG/v/amK5XyhhdR6L89XM0VB/90=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nFDBI28x4ZiDFE7isdrvGIl/lf7ESnpFS7M8Bjsw/L9P/8HUcb13XCybUaZoXjw6V U9kycWLQo09QG419pQh8UxNbVHmsJdyxK9QBSIrww6uH0KKkUDOMsio0UoqgCbgnMF 3nf2stKmc8UlolCIZd20DgdQwG+7J+80cqr33Gh4= From: "info at kemalakcam dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106873] unsigned short skips byte when used for memory mapping depending on position in structure Date: Mon, 12 Sep 2022 03:16:19 +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.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: info at kemalakcam 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=3D106873 --- Comment #6 from Kemal Akcam --- (In reply to Jonathan Wakely from comment #5) > Read https://en.cppreference.com/w/c/language/object#Alignment (for C) and > https://en.cppreference.com/w/cpp/language/object#Alignment (for C++). >=20 > Instead of filing bugs like this and PR 106869, please find somewhere more > suitable to learn how C++ works. Both your "bugs" would be appropriate as > questions on StackOverflow (in fact they have probably already been answe= red > there, and you could find the answers by searching). "I find GCC's behavi= our > surprising" is not a bug. I like writing a piece of code to analyse software behaviour and sometimes = it is not the software that I'm analysing. I thank both of you giving quick insight with your responses. I still like GCC thou. Best regards.=