From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20811 invoked by alias); 21 Aug 2019 14:58:03 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 20802 invoked by uid 89); 21 Aug 2019 14:58:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=H*f:sk:0A5DAB1, H*i:sk:0A5DAB1, H*F:D*ru X-HELO: smtp.ispras.ru Received: from bran.ispras.ru (HELO smtp.ispras.ru) (83.149.199.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Aug 2019 14:58:01 +0000 Received: from monopod.intra.ispras.ru (monopod.intra.ispras.ru [10.10.3.121]) by smtp.ispras.ru (Postfix) with ESMTP id 7D141203BF; Wed, 21 Aug 2019 17:57:58 +0300 (MSK) Date: Wed, 21 Aug 2019 14:58:00 -0000 From: Alexander Monakov To: Paul Koning cc: =?ISO-8859-15?Q?Markus_Fr=F6schle?= , gcc@gcc.gnu.org Subject: Re: asking for __attribute__((aligned()) clarification In-Reply-To: <0A5DAB14-F153-486B-BA04-6AD500C85E71@comcast.net> Message-ID: References: <1E465204-0887-49CB-8472-196EDE7AAE81@comcast.net> <055f71a6-7b20-eb80-6f0a-d7572c34fa47@arm.com> <0A5DAB14-F153-486B-BA04-6AD500C85E71@comcast.net> User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2019-08/txt/msg00172.txt.bz2 On Wed, 21 Aug 2019, Paul Koning wrote: > I agree, but if the new approach generates a warning for code that was written > to the old rules, that would be unfortunate. FWIW I don't know which GCC versions accepted 'packed' on a scalar type. Already in 2006 GCC 3.4 would issue a warning: $ echo 'typedef int ui __attribute__((packed));' | gcc34 -xc - -S -o- .file "" :1: warning: `packed' attribute ignored .section .note.GNU-stack,"",@progbits .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-4)" > Yes. But last I tried, optimizing that for > 1 alignment is problematic > because that information often doesn't make it down to the target code even > though it is documented to do so. Thanks, indeed this memcpy solution is not so well suited for that. Alexander