> > > Index: lib/Sema/SemaStmt.cpp > =================================================================== > --- lib/Sema/SemaStmt.cpp (revision 129825) > +++ lib/Sema/SemaStmt.cpp (working copy) > @@ -1257,7 +1257,8 @@ > ExprResult BoundExpr; > if (const ConstantArrayType *CAT = > dyn_cast<ConstantArrayType>(UnqAT)) > BoundExpr = Owned(IntegerLiteral::Create(Context, CAT->getSize(), > - Context.IntTy, > RangeLoc)); > + > Context.getPointerDiffType(), > + RangeLoc)); > > > This should be the pointer difference type for the right address space. > You could add an accessor to ASTContext to get the corresponding type for > the array's address space from the target info (perhaps > ASTContext::getArrayBoundType(QualType ArrayType)). >
I am not sure I understand. I thought that there's only one pointer difference type? > > > else if (const VariableArrayType *VAT = > dyn_cast<VariableArrayType>(UnqAT)) > BoundExpr = VAT->getSizeExpr(); > > > Thanks again for looking into this! > Richard > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
