[cfe-commits] r63517 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Sema/struct-decl.c

Nuno Lopes nunoplopes at sapo.pt
Mon Feb 2 14:12:41 PST 2009


> On Mon, Feb 2, 2009 at 7:00 AM, Nuno Lopes <nunoplopes at sapo.pt> wrote:
>> -  if (Res > llvm::APSInt(Res.getBitWidth(), Res.isUnsigned()))
>> -    return Context.getConstantArrayType(VLATy->getElementType(),
>> -                                        Res, ArrayType::Normal, 0);
>> -  return QualType();
>> +
>> +  return Context.getConstantArrayType(VLATy->getElementType(),
>> +                                      Res, ArrayType::Normal, 0);
>>  }
>
> We do not want to be letting though negative numbers here; instead of
> eliminating the check completely, we should explicitly check for Res
> == 0.

Ah, right, thanks. For some unknown reason I though the value had to be 
always unsigned. I'll fix it right away.
Nuno 




More information about the cfe-commits mailing list