Good. The reason I added the note was the gcc test case that inspired the patch used __attribute__((aligned(256))) on a function and expected that to be the __alignof__. Although that doesn't seem to work on my current gcc.
- Daniel ----- Original Message ---- From: Mike Stump <[EMAIL PROTECTED]> To: Daniel Dunbar <[EMAIL PROTECTED]> Cc: [email protected] Sent: Tuesday, July 22, 2008 3:39:45 PM Subject: Re: [cfe-commits] r53928 - /cfe/trunk/lib/CodeGen/CGExprScalar.cpp On Jul 22, 2008, at 12:44 PM, Daniel Dunbar wrote: > Author: ddunbar > Date: Tue Jul 22 14:44:18 2008 > New Revision: 53928 > > URL: http://llvm.org/viewvc/llvm-project?rev=53928&view=rev > Log: > Add note to check what __alignof__ a function type should be. If this is represented by: int(*f)(int); main() { printf("align is %d\n", __alignof__(*f)); } then gcc gives 1. > + // FIXME: what is alignof a function type in gcc? > if (TypeToSize->isVoidType() || TypeToSize->isFunctionType()) > return llvm::ConstantInt::get(llvm::APInt(ResultWidth, 1)); _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
