From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7742 invoked by alias); 10 Oct 2011 00:34:47 -0000 Received: (qmail 7650 invoked by uid 22791); 10 Oct 2011 00:34:46 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from idcmail-mo1so.shaw.ca (HELO idcmail-mo1so.shaw.ca) (24.71.223.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Oct 2011 00:34:32 +0000 Received: from pd4ml3so-ssvc.prod.shaw.ca ([10.0.141.150]) by pd2mo1so-svcs.prod.shaw.ca with ESMTP; 09 Oct 2011 18:34:31 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=fp/YrIG6YJuYYWILSlVONgBms0XWtFqTjqHWlNKfnDg= c=1 sm=1 a=W5crty74aesA:10 a=DleS9gN0D5YA:10 a=SV9grZ613K4A:10 a=BLceEmwcHowA:10 a=i7s4YuWtaOcA:10 a=IkcTkHD0fZMA:10 a=IaHBZPgZ0vV7m0nTkA8unw==:17 a=GzhK8rXA2a9zErp5tRAA:9 a=QEXdDO2ut3YA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO kylheku.com) ([24.85.131.247]) by pd4ml3so-dmz.prod.shaw.ca with ESMTP; 09 Oct 2011 18:34:31 -0600 Received: from www-data by kylheku.com with local (Exim 4.69) (envelope-from ) id 1RD3pB-00014z-0g for gcc-help@gcc.gnu.org; Sun, 09 Oct 2011 17:34:33 -0700 To: Subject: Specify alignment for string literal. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 10 Oct 2011 00:34:00 -0000 From: Kaz Kylheku Message-ID: <4b542aa7f2029423c7e64c5fc6a8f153@127.0.0.1> X-Sender: kaz@kylheku.com User-Agent: Roundcube Webmail/0.4 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00056.txt.bz2 Hi all, Is there any way to specify the alignment of a literal, with __attribute__ ((align ...)) That is to say: /* wchar_t is 16 bits and 2 byte aligned on this platform; I want 4 byte alignment */ wchar_t *foo = L"..."; The attribute has to go on the literal object, not on foo, obviously. If there is such a feature, it's not obviously documented in the manual. I have other ways of solving the problem I'm working on, but this would be ideal.