Moore, Robert wrote:
Native word size of the machine.
As I remember, lint especially really likes array indexes that use the
word size of the machine, and of course it is the most efficient
usually. However, there is no C data type that represents the native
word size across all compilation models.
and native word size being sizeof(void *)?
Let's look on that from the other perspective. int is intended by C authors
as least expensive to use integer type. long is intended to be least expensive
integer type of maximum capacity. Both types play nice with printf() and Co.
Now we introduce new typedef to annoy printf(), C, and Linux bosses only to
please lint?
Regards,
Alex.
-----Original Message-----
From: Alexey Starikovskiy [mailto:aystarik@xxxxxxxxx]
Sent: Tuesday, April 15, 2008 1:40 PM
To: Moore, Robert
Cc: Alexey Starikovskiy; Len Brown; linux-acpi@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 65/73] ACPICA: Fix for extraneous debug message for
packages
Moore, Robert wrote:
I think one of the reasons we introduced ACPI_NATIVE_UINT is that
"int"
is in fact not "native" under all compilation models.
Here is the table from actypes.h
* Datatype LP64 ILP64 LLP64 ILP32 LP32 16bit
* char 8 8 8 8 8 8
* short 16 16 16 16 16 16
* _int32 32
* int 32 64 32 32 16 16
* long 64 64 32 32 32 32
* long long 64 64
* pointer 64 64 64 32 32 32
Sorry, what do you mean by "not native" ?
sizeof(int) != sizeof(void *) or something else?
How does it change applicability as array index?
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html