rnk added a comment.

In https://reviews.llvm.org/D46042#1121674, @rjmccall wrote:

> > I think we should revert this for now. Adding the alignment attribute to 
> > all Intel vector typedefs is a bigger change than it seems.
>
> Ugh.  That is just an awful language rule.   Would it be reasonable to 
> restrict it to only attributes spelled with `__declspec(align(N))` rather 
> than `__attribute__((aligned(N)))`, or is that too invasive in the alignment 
> computation?


When we were working on the record layout code, I didn't want to do that 
because users often structure their portability headers to check for 
`__clang__` first because clang also defines `_MSC_VER` and `__GNUC__`. I felt 
it would be best if the alignment attributes were as interchangeable as 
possible. They are very common.

Maybe checking the spelling of the packing attribute would work better. The GCC 
`__attribute__` spelling would ignore what we called "required alignment", 
meaning alignment required by explicit attributes and not the normal `alignof`.


Repository:
  rC Clang

https://reviews.llvm.org/D46042



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to