[cfe-dev] __aligned__ attribute doesn't parse correctly

Chris Lattner clattner at apple.com
Tue Jan 29 20:54:34 PST 2008


On Jan 29, 2008, at 8:31 PM, Eli Friedman wrote:
> Testcase:
> struct a{int b;} b __attribute__((__aligned__));
>
> gcc says it's okay, clang gives an error.  (From pthread.h.)

This is definitely ok.  We should accept and ignore it for now (as  
well as the version that takes an argument).

This will let you compile code that uses pthread.h but will break  
codegen for that particular struct.  In time we should add packed  
codegen support as well,

-Chris



More information about the cfe-dev mailing list