From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1580 invoked by alias); 10 Aug 2012 08:16:32 -0000 Received: (qmail 1564 invoked by uid 22791); 10 Aug 2012 08:16:29 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from asav3.lyse.net (HELO asav3.lyse.net) (81.167.37.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Aug 2012 08:16:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by asav3.lyse.net (Postfix) with ESMTP id 947918402C; Fri, 10 Aug 2012 10:16:04 +0200 (CEST) Received: from jupiter.westcontrol.no (unknown [79.161.10.130]) by asav3.lyse.net (Postfix) with ESMTP id 2F29A84116; Fri, 10 Aug 2012 10:16:04 +0200 (CEST) Received: from [192.168.0.60] (helo=[192.168.0.60]) by jupiter.westcontrol.no with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1SzkO3-0007K1-8c; Fri, 10 Aug 2012 10:16:03 +0200 Message-ID: <5024C14C.6010504@westcontrol.com> Date: Fri, 10 Aug 2012 08:16:00 -0000 From: David Brown User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Georg-Johann Lay CC: =?ISO-8859-1?Q?G=F6ran_Steen?= , "gcc-help@gcc.gnu.org" Subject: Re: 16-bit int References: <5023BD01.6090401@westcontrol.com> <5024AE17.5060004@gcc.gnu.org> In-Reply-To: <5024AE17.5060004@gcc.gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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: 2012-08/txt/msg00069.txt.bz2 On 10/08/2012 08:45, Georg-Johann Lay wrote: > David Brown schrieb: >> On 09/08/2012 13:26, Göran Steen wrote: >>> >>> I use gcc version 4.3.4, where int is 32-bit variables. Is it >>> possible to setup compiler to compile int as 16-bit variables? > > The m86k port has 32-bit int, -mshort turns it to 16 bit. > >> The size of an int depends on the target - gcc supports dozens of >> targets. Most have 32-bit ints, but some have 16-bit ints and at >> least one has a compile-time option to support 8-bit ints (though that >> goes against C standards, and is deprecated on current builds). There >> are probably also targets with 64-bit ints. > > You mean the avr port? int is 16 bits wide and -mint8 implements the > non-standard 8-bit int. That option was broken for quite some time, > see PR46261. But that PR is fixed now. > > Where in the release notes did you read about deprecation of -mint8? > I thought -mint8 had been broken for so long, and that there were no plans to fix it or support it in avrlibc, especially as the main reason for its existence (inefficient code generated for uint8_t and int8_t with normal 16-bit ints) is much less of a problem with newer versions of avr-gcc. I guess I incorrectly extrapolated from this that the option was deprecated - I certainly hadn't noticed that the PR had been fixed. Thanks for the correction.