[cfe-dev] Simplify/fix-up Sema-level struct layout

Devang Patel dpatel at apple.com
Wed May 28 09:58:42 PDT 2008


On May 28, 2008, at 7:56 AM, Eli Friedman wrote:

> Patch per subject.  This simplifies the code a bit by sharing the same
> codepath for unions and structs, and fixes some bugs with some edge
> cases (the edge cases addressed are in the testcases in the patch).
> As far as I know, this is correct on X86 for all combinations of
> bitfields, the packed attribute, and the aligned attribute in both
> structs and unions.


>  However, I haven't tested heavily.  (Anyone up
> for making a struct/union fuzz tester?)

1. Checkout llvm-gcc-42 sources. It includes gcc testsuite.
2. Put clang and ccc in your path

and do

3. runtest --srcdir /...../llvmgcc42/gcc/testsuite GCC_UNDER_TEST=ccc  
HOSTCC=gcc HOSTCFLAGS="-g" --tool gcc struct-layout-1.exp

If this reports all passes and zero failure then you're golden!


More information about the cfe-dev mailing list