mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Max Ruttenberg <mruttenberg@emutechnology.com>
To: musl@lists.openwall.com
Subject: Re: the size of the int type
Date: Fri, 15 Jan 2016 16:19:03 -0500	[thread overview]
Message-ID: <CAD+Cw=eLZxa_VB2UbxNhbazg3wp4rp9YJQ+zNpCy046Sx0D5Cw@mail.gmail.com> (raw)
In-Reply-To: <CAMAJcuDcB3PG1NSXr69bPTHvQmOdZtXEghR4+OnidfzfpQCTpw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]

Thank you!

On Fri, Jan 15, 2016 at 4:11 PM, Josiah Worcester <josiahw@gmail.com> wrote:

> I do not know of anything in musl that assumes "int" is 32-bit, but I'm
> confident that implementing it as anything else will break a large amount
> of third party code. Practically all platforms in common use have 32-bit
> int (regardless of the machine's word size), and as such a lot of code
> relies on this (implicitly or explicitly).
> You would do better to match the convention used on modern-day Unix
> systems, where int is 32-bit, long is the machine word size, and long long
> is 64-bit. If you do this everything should pretty much function as it
> expects, with regard to the standard C types' sizes.
>
> On Fri, Jan 15, 2016 at 1:01 PM Max Ruttenberg <
> mruttenberg@emutechnology.com> wrote:
>
>> Hi,
>>
>> I'm wondering if there's any code in musl that makes assumptions on the
>> size of the "int" type.
>>
>> I only ask because I'm debating how my compiler (which targets a machine
>> with a 64-bit word size) should define the int type. Ideally I'd like to
>> break as little library code as possible.
>>
>> Max
>>
>


-- 
Max Ruttenberg,
Member of the Technical Staff
Emu *Technology*
1400 E Angela Blvd, Unit 101
South Bend, IN 46617

[-- Attachment #2: Type: text/html, Size: 2539 bytes --]

  reply	other threads:[~2016-01-15 21:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 21:01 Max Ruttenberg
2016-01-15 21:11 ` Josiah Worcester
2016-01-15 21:19   ` Max Ruttenberg [this message]
2016-01-16 11:09   ` croco
2016-01-16 13:09     ` Jens Gustedt
2016-01-18 15:22       ` Max Ruttenberg
2016-01-15 21:33 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD+Cw=eLZxa_VB2UbxNhbazg3wp4rp9YJQ+zNpCy046Sx0D5Cw@mail.gmail.com' \
    --to=mruttenberg@emutechnology.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).