Re: Use of C99 int types
From: Al Viro (viro_at_parcelfarce.linux.theplanet.co.uk)
Date: 04/04/05
- Previous message: Dag Arne Osvik: "Re: Use of C99 int types"
- In reply to: Dag Arne Osvik: "Re: Use of C99 int types"
- Next in thread: Grzegorz Kulewski: "Re: Use of C99 int types"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 4 Apr 2005 00:05:51 +0100 To: Dag Arne Osvik <da@osvik.no>
On Mon, Apr 04, 2005 at 12:48:04AM +0200, Dag Arne Osvik wrote:
> unsigned long happens to coincide with uint_fast32_t for x86 and x86-64,
> but there's no guarantee that it will on other architectures. And, at
> least in theory, long may even provide less than 32 bits.
To port on such platform we'd have to do a lot of rewriting - so much that
the impact of this issue will be lost in noise.
Look, it's very simple:
* too many people blindly assume that all world is 32bit l-e.
* too many of those who try to do portable code have very little
idea of what that means - see the drivers that try and mix e.g. size_t with
int, etc.
* stdint is not widely understood, to put it mildly.
* ...fast... types have very unfortunate names - these are guaranteed
to create a lot of confusion.
* pretty much everything in the kernel assumes that
4 = sizeof(int) <=
sizeof(long) = sizeof(pointer) = sizeof(size_t) = sizeof(ptrdiff_t) <=
sizeof(long long) = 8
and any platform that doesn't satisfy the above will require very serious
work on porting anyway.
-
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/
- Previous message: Dag Arne Osvik: "Re: Use of C99 int types"
- In reply to: Dag Arne Osvik: "Re: Use of C99 int types"
- Next in thread: Grzegorz Kulewski: "Re: Use of C99 int types"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|