On Jun 18, 2012, at 1:16 PM, Aaron Ballman wrote:
> Here's a revised patch that takes advantage of Sean Hunt's work on
> attributes as well (and incorporates the changes Richard suggested
> previously).
+ if (isDeclSpec) {
+ // We've already verified it's a power of 2, now let's make sure it's
+ // 8192 or less
+ if (Alignment.getZExtValue() > 8192) {
+ Diag(AttrLoc, diag::err_attribute_aligned_greater_than_8192)
+ << E->getSourceRange();
+ return;
+ }
+ }
This seems like it ought to be a target-specific value for the maximum
supported alignment, not a magic number which is only checked if
the attribute was written a particular way.
This would also significantly reduce the complexity of this patch.
Otherwise, it looks pretty good.
John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits