On Sep 7, 2012, at 2:13 PM, Jordan Rose <[email protected]> wrote:

> 
> On Sep 7, 2012, at 12:20 , Anna Zaks <[email protected]> wrote:
> 
>> +          // For now, let's only reason about arrays of built in types.
>> +          if (!ElemType->isBuiltinType())
>> +            continue;
> 
> Why this exception? It seems to me like arrays of user-defined types will 
> make this warning almost always valid, since you can't allocate extra space 
> for each element. Is there a specific case you're trying to handle here?

int *mallocArraySize() {
  static const int nestedTable[10][10];
  int *table1 = malloc(sizeof nestedTable);
  return table;
}

Anna.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to