================
Comment at: lib/Sema/SemaExpr.cpp:6735
@@ +6734,3 @@
+ CharUnits ElementSize = Context.getTypeSizeInChars(rpointee);
+ if (ElementSize.isZero() && rpointee.getTypePtr()->isStructureType()) {
+ Diag(Loc,diag::err_sub_ptr_zero_size_types)
----------------
Why do you need the second check here? Any time the pointee has size zero, the
pointer subtraction will divide by zero, right?
http://llvm-reviews.chandlerc.com/D637
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits