On Dec 14, 2007, at 2:21 PM, Bill Wendling wrote: > Well, the standard says to "integer" type, so probably not unsigned. > But that's my understanding of it. Though I don't believe that sizeof > should be evaluating the expression...
There are occasions when sizeof(type) actually does evaluate an expression in the case of VLA types. This is what prompted this email (I'm trying to piece together all the contingencies). In clang, the issue is that when the argument type of SizeOfAlignOfTypeExpr is of type VariableArrayType the size expression of the VLA type must be evaluated (within the sizeof) in order to determine the size of the type. I believe this excludes typedefs, since the size expression will be evaluated at the typedef location. There may be other corner cases I'm not seeing yet with sizeof and VLAs. _______________________________________________ cfe-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
