[cfe-commits] r146482 - /cfe/trunk/lib/AST/ASTContext.cpp

Chris Lattner clattner at apple.com
Tue Dec 13 10:34:12 PST 2011


Honest question: why would that be better?

-Chris

On Dec 13, 2011, at 9:52 AM, Marshall Clow <mclow.lists at gmail.com> wrote:

> On Dec 13, 2011, at 9:37 AM, Peter Cooper wrote:
> 
>> Hi Abramo
>> 
>> We're getting some buildbot failures on the gcc test suite since this change.  The test has a very large union in it which must be triggering your new assert.
>> 
>> Can you please have a look and see if your assert is correct on this test?
>> 
>> The test in question is gcc.c-torture/execute/991014-1.c
> 
> A coding style suggestion (while you're at it).
> Instead of
>        (uint64_t)(-1)
> you should use:
>        std::numeric_limits<uint64_t>::max ();
> (and include <limits> if necessary)
> 
>>> +    assert((Size == 0 || EltInfo.first <= (uint64_t)(-1)/Size) && "Overflow in array type bit size evaluation");
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list