I guess one could assert that the number of names is less than or equal to the number of bits in U32, yes. On Apr 22, 2014 9:43 PM, "Tony Cook via RT" <perlbug-followup@perl.org> wrote: > On Tue Apr 22 17:33:07 2014, jhi wrote: > > Needed compile-time limits for the PL_reg_intflags_name so that the > > bit loop doesn't waltz off past the array. Could not use C_ARRAY_LENGTH > > because the size of name array is not visible during compile time > > (only const char*[] is), so modified regcomp.pl to generate the size, > > made it visible only for the re extension. Did extflags analogously > > even though its size currently exactly 32 already. The sizeof(flags)*8 > > is extra paranoia for ILP64. > > Wouldn't the paranoia in: > > + for (bit=0; > + bit<REG_EXTFLAGS_NAME_SIZE && bit<sizeof(flags)*8; > + bit++) { > > be better handled with an assert? Even a compile-time assert if we had > the mechanism for it. > > Tony >Thread Previous | Thread Next