[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] i386 Double alignment- bug?
From: |
Mike Henning |
Subject: |
[Tinycc-devel] i386 Double alignment- bug? |
Date: |
Tue, 19 Sep 2006 09:56:17 -0700 (PDT) |
I noticed that the sizeof a double is returned as 8,
which should be correct, but 4 is returned in align.
Sizeof seems to return incorrect values when taking
the size of a struct containing any variables of type
double when #pragma pack is used.
#pragma pack(8)
typedef struct _foo
{
char a;
int v1;
int v2;
double d1;
}foo;
sizeof(foo) = 20 regardless of the pack value set.
Using the above example it should return 24.
If I change the align to return 8 for type double then
sizeof seems to return the correct value taking into
consideration the pack value used.
So should align be returning 8 here?
Thanks,
Mike Henning
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
- [Tinycc-devel] i386 Double alignment- bug?,
Mike Henning <=