Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760799AbXERWBK (ORCPT ); Fri, 18 May 2007 18:01:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755050AbXERWA6 (ORCPT ); Fri, 18 May 2007 18:00:58 -0400 Received: from mail-in-09.arcor-online.net ([151.189.21.49]:35165 "EHLO mail-in-09.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754560AbXERWA6 (ORCPT ); Fri, 18 May 2007 18:00:58 -0400 In-Reply-To: <1179499959.2859.579.camel@shinybook.infradead.org> References: <20070517143200.GA30850@lst.de> <1179413443.3642.49.camel@sauron> <20070517145653.GA968@lst.de> <1179414590.3642.69.camel@sauron> <20070517102931.6bbbad1a.akpm@linux-foundation.org> <1179455959.2859.527.camel@shinybook.infradead.org> <1179458274.2859.538.camel@shinybook.infradead.org> <1179499959.2859.579.camel@shinybook.infradead.org> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <6c8c0e6cd0ac95fd1c7d4e822f1e2029@kernel.crashing.org> Content-Transfer-Encoding: 7bit Cc: Matthieu CASTET , "John Anthony Kazos Jr." , linux-kernel@vger.kernel.org From: Segher Boessenkool Subject: Re: [PATCH] ubi: kill homegrown endian macros Date: Sat, 19 May 2007 00:00:56 +0200 To: David Woodhouse X-Mailer: Apple Mail (2.623) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 724 Lines: 21 >> Out of curiosity, why would a compiler ever insert padding in a >> structure >> that has all its elements properly-aligned? > > Well, it might decide it would be nicer if some elements were aligned > to > 64 bits. Or to a cache line. Or something. I don't care about _why_ -- > the point is that it's _allowed_ to. Hence the original use of > __attribute__((packed)). It's not the compiler who decides -- struct layout is dictated by the ABI you're compiling for. Segher - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/