On Thu, Jan 23, 2014 at 12:18 PM, Anders Rönnholm
<[email protected]> wrote:
> <<A few thoughts:
> <<
> <<Could this be generalized to fit _Alignof and _Generic (the controlling 
> expression) as well? The behavior is the same for all three <<(they're 
> unevaluated).
> <<
> I wonder if we could wait with this.

I don't think it should block this patch, though perhaps some of the
identifiers (and diagnostics) could be genericized in anticipation of
this functionality?

>
> <<Also, in terms of sizeof, if the expression modifies a VLA, the behavior is 
> sadly well-defined (in C). Eg)
> <<
> <<size_t f(size_t n) {
> <<  /* n must be incremented */
> <<  size_t a = sizeof(int[++n]);
> <<  return n;
> <<}
>>>This will return n + 1 because it affects the size of the VLA. So we 
>>>probably should not warn on that case.
> <<
> Good because this checker does not warn in this case.

Fantastic!

~Aaron

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

Reply via email to