On Wed, May 9, 2018 at 4:55 AM, Jakub Jelinek <ja...@redhat.com> wrote: > On Tue, May 08, 2018 at 11:28:18PM -0400, Jason Merrill wrote: >> Maybe add a type parameter that defaults to size_type_node... >> >> > + ret = fold_convert_loc (loc, TREE_TYPE (expr), >> > + fold_offsetof_1 (TREE_TYPE (expr), op0)); >> >> ...and then this can be >> >> fold_offsetof (op0, TREE_TYPE (exp0)) > > Like this then? > > + ret = fold_convert_loc (loc, TREE_TYPE (expr), > + fold_offsetof (op0, TREE_TYPE (expr)));
I was thinking that we then wouldn't need the fold_convert at the call sites anymore, either. Jason