From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83773 invoked by alias); 25 Mar 2017 13:41:39 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 83706 invoked by uid 89); 25 Mar 2017 13:41:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.4 required=5.0 tests=AWL,BAYES_05,GARBLED_BODY,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*MI:mid, H*r:TLS1.2, H*M:mid, H*r:4.88 X-Spam-Status: No, score=2.4 required=5.0 tests=AWL,BAYES_05,GARBLED_BODY,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: ** X-HELO: albireo.enyo.de From: Florian Weimer To: =?utf-8?B?7KCV7J2467CwKEluYmFlIEplb25nKQ==?= Cc: jit@gcc.gnu.org Subject: Re: Alignment not supported? References: Date: Sun, 01 Jan 2017 00:00:00 -0000 In-Reply-To: (=?utf-8?B?IuygleyduOuwsCIncw==?= message of "Sat, 25 Mar 2017 20:14:02 +0900") Message-ID: <87fui1pj74.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2017-q1/txt/msg00009.txt.bz2 * =EC=A0=95=EC=9D=B8=EB=B0=B0: > I need to align a type for calling an external function. > > How do I set the alignment for a type like the struct below? > > struct my_arg { > int a; > alignas(32) int b; > }; > > I don't see any option for giving the alignment requirement to b. This should work: struct my_arg { int a; int b __attribute__ ((aligned (32))); };