On Sat, Jan 24, 2009 at 12:17 PM, Chris Lattner <[email protected]> wrote: > + // alignof decl is always ok. > + if (isa<DeclRefExpr>(E)) > + return false;
That looks wrong... what about something like the following? extern struct x a; int b = __alignof(a); Wait, actually, it appears that gcc accepts this?! Conceptually, it seems like a better fix for PR3386 would be adding something like "if (!isSizeof && exprType->isIncompleteArrayType()) exprType = exprType->getAsArrayType()->getElementType();" at the beginning of CheckSizeOfAlignOfOperand. -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
