On Tue, Dec 20, 2016 at 04:55:29PM +0200, Janne Blomqvist wrote: > On Tue, Dec 20, 2016 at 3:42 PM, Andre Vehreschild <ve...@gmx.de> wrote: > > Hi all, > > > >> I think you should use build_zero_cst(size_type_node) instead of > >> size_zero_node as size_zero_node is of type sizetype which is not the > >> same as size_type_node. Otherwise looks good. > > > > In the software design classes I took this was called a design error: Not > > choosing sufficiently different names for different artifacts. It was > > considered a beginner's error. > > Yeah, sizetype vs. size_type_node is confusing, to say the least..
The first one is GCC internal type for representing sizes, the latter is the C size_t (usually they have the same precision, they always have the same signedness (unsigned)). In the past sizetype actually has been a signed type with very special behavior. Jakub