From owner-freebsd-current@FreeBSD.ORG Sun Nov 12 14:53:11 2006 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87E6916A403; Sun, 12 Nov 2006 14:53:11 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id B077F43D8C; Sun, 12 Nov 2006 14:52:52 +0000 (GMT) (envelope-from keramida@FreeBSD.org) Received: from kobe.laptop (host155-42.pool8174.interbusiness.it [81.74.42.155] (may be forged)) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id kACEqUis000662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 12 Nov 2006 16:52:33 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id kACEqObg002858; Sun, 12 Nov 2006 15:52:25 +0100 (CET) (envelope-from keramida@FreeBSD.org) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id kACEqOXN002857; Sun, 12 Nov 2006 15:52:24 +0100 (CET) (envelope-from keramida@FreeBSD.org) Date: Sun, 12 Nov 2006 15:52:24 +0100 From: Giorgos Keramidas To: Ruslan Ermilov Message-ID: <20061112145223.GE2331@kobe.laptop> References: <20061112133929.9194773068@freebsd-current.sentex.ca> <20061112140010.GA47660@rambler-co.ru> <20061112142710.GE91556@wombat.fafoe.narf.at> <20061112144618.GB49703@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061112144618.GB49703@rambler-co.ru> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.463, required 5, autolearn=not spam, BAYES_00 -2.60, FORGED_RCVD_HELO 0.14, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: current@FreeBSD.org Subject: Re: [head tinderbox] failure on arm/arm X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 14:53:11 -0000 On 2006-11-12 17:46, Ruslan Ermilov wrote: >On Sun, Nov 12, 2006 at 03:27:10PM +0100, Stefan Farfeleder wrote: >>> This looks like a GCC bug to me. The following code snippet, >>> when compiled on FreeBSD/arm, causes a -Wcast-align warning >>> which doesn't look right: >>> >>> %%% >>> $ cat a.c >>> struct foo { >>> char x; >>> }; >>> >>> struct foo * >>> bubu(char *s) >>> { >>> >>> return (struct foo *)s; >>> } >>> $ cc -c -Wcast-align a.c >>> a.c: In function `bubu': >>> a.c:9: warning: cast increases required alignment of target type >>> %%% >>> >>> (None of other supported architecutes see the issue here.) >> >> What is sizeof(struct foo)? If it's > 1 it makes sense. > > Yes, it's four bytes on ARM. But why? Probably because GCC thinks accessing 4-byte quantities is much much cheaper than 1-byte accesses on this ARM board. I'm not sure why GCC thinks so, though.