[cfe-commits] r111338 - in /cfe/trunk: include/clang/AST/Type.h include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Type.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaExprCXX.cpp lib/Sema/SemaType.cpp test/Sema/array-size-64.c test/Sema/array-size.c

Douglas Gregor dgregor at apple.com
Tue Aug 17 18:12:44 PDT 2010


On Aug 17, 2010, at 5:55 PM, Eli Friedman wrote:

> On Tue, Aug 17, 2010 at 5:39 PM, Douglas Gregor <dgregor at apple.com> wrote:
>> Author: dgregor
>> Date: Tue Aug 17 19:39:00 2010
>> New Revision: 111338
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=111338&view=rev
>> Log:
>> Emit an error if an array is too large. We're slightly more strict
>> than GCC 4.2 here when building 32-bit (where GCC will allow
>> allocation of an array for which we can't get a valid past-the-end
>> pointer), and emulate its odd behavior in 64-bit where it only allows
>> 63 bits worth of storage in the array. The former is a correctness
>> issue; the latter is harmless in practice (you wouldn't be able to use
>> such an array anyway) and helps us pass a GCC DejaGNU test.
> 
> Does this fix http://llvm.org/bugs/show_bug.cgi?id=1889?
> 
> -Eli

Ah, yes it does! Thanks, Eli.

	- Doug



More information about the cfe-commits mailing list