Actually the adder would not have extra undriven inputs _because_ those
branches are not reached, and the synthesizer only implements code that
is reached. For the cases where you don't have the maximum R_SIZE,
there would be some unused (and undriven) signals, but these would
generally get trimmed at or after physical synthesis. If you used
the other example with a loop, you could size the mod_cmplt vector
using R_SIZE and then there would be no unused signals. If you like
to avoid warnings during synthesis and build, then that is a cleaner
approach.
--
Gabor