[cfe-dev] ConstantArrayType's size is not always of pointer width

Sebastian Redl sebastian.redl at getdesigned.at
Tue Dec 2 08:51:37 PST 2008


Hi,

Not sure if this is intentional or not, but ConstantArrayType's Size 
member is an APInt that doesn't always have pointer width.

Hmm ... looking at the code that creates the type (SemaType.cpp:391), 
the array size is in fact always 32 bits wide. This definitely looks 
like a bug.

Am I correct? Should the array size always be pointer width? At least 
Analysis/RegionStoreManager made this assumption, causing a failing 
assertion in the Analysis/array-struct.c test case.

Sebastian



More information about the cfe-dev mailing list