On Wed, May 22, 2019 at 3:20 PM Andrew Stubbs <a...@codesourcery.com> wrote: > > On 22/05/2019 12:35, Janne Blomqvist wrote: > > Thanks for the catch. Though for size_t you should use build_zero_cst > > (size_type_node). size_zero_node is a zero constant of type sizetype, > > which is not the same as size_type_node (size_t in C). Ok with that > > change. > > So, integer_zero_node is compatible with integer_type_node, but > size_zero_node is not (necessarily) compatible with size_type_node? > Well, that's just asking for trouble. :-(
Indeed it is. IIRC the main difference is that while both are unsigned types, sizetype has undefined behavior on overflow whereas size_type_node wraps around. And sizetype is an internal implementation detail, so should not be used in ABI-visible places. > Just to confirm, is the attached what you mean? Yes, looks good. -- Janne Blomqvist