On Fri, Nov 16, 2018 at 11:25:15AM -0700, Martin Sebor wrote: > On 11/16/2018 01:43 AM, Jakub Jelinek wrote: > > > > + /* This matters only for targets where ssizetype has smaller precision > > + than 32 bits. */ > > + if (wi::lts_p (wi::to_wide (TYPE_MAX_VALUE (ssizetype)), length)) > > + { > > + error ("size of string literal is too large"); > > It would be helpful to mention the size of the literal and the limit > so users who do run into the error don't wonder how to fix it.
It is consistent with what we emit for the arrays. So, if the size and limit info is helpful to users, we should provide that for those too. I mean the: if (name) error_at (loc, "size of array %qE is too large", else error_at (loc, "size of unnamed array is too large"); name); calls in the C FE and similar stuff in C++ FE. Feel free to add that to all of those. Jakub