Open
Description
sizeof
currently only accepts a restricted set of arguments: builtin types, identifiers and member expressions (referring to types or variables). Allowing more general expressions is necessary to implement safer allocation and copy idioms:
MyType *p;
[...]
p = malloc(length, sizeof(*p));
similarly:
string.memset(array, 0, length * sizeof(*array));
Metadata
Metadata
Assignees
Labels
No labels