On Jan 11, 2010, at 1:24 PM, Ken Dyck wrote:

>> 
>> I'm also concerned about the dimensionality here.  Why did we 
>> choose 'Chars' instead of 'Bytes'?
> 
> The short answer is that it reflects how getTypeSizeInChars() calculates
> its value. It divides the bit size of the type by the bit size of the
> char type, so calling them CharUnits seemed more accurate than
> ByteUnits. The aim is to eventually support character widths other than
> 8.
> 
> What specifically are you concerned about?


Hi Ken,

I'm concerned that the uses of getTypeSize() / 8 always want the size in bytes, 
not chars (if the size of chars differs from the size of bytes).  Code that 
expects getTypeSizeInChars() to return the size in bytes (which is all the 
cases in libAnalysis) will get the wrong results.

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

Reply via email to