[cfe-dev] packet structs containing vectors

Jochen Wilhelmy j.wilhelmy at arcor.de
Sun Oct 24 13:20:13 PDT 2010


Hi!

I have the following problem. I have a struct, e.g.
#pragma pack(1)
    struct Foo
    {
        float3 bar;
    };
    #pragma pack()

sizeof(Foo) is 16 instead of 12. I would think this is a bug.
clang should internally break up the float3 into three floats inside a 
packed
struct. What do you think?
(I'm using the 2.8 branch)

-Jochen




More information about the cfe-dev mailing list