In my opinion that doesn't make much sense but that's what it is. So, the outermost loop should be continued and there should be no warning message, neither for "continue", nor for "break" as
POSIX has similar language for it stating that a too large number defaults to the outermost loop.
What about cases where the targeted loop is in a different subshell?
Thanks to the first patch, the "break" in "for x in a b; do ( break ) done" now triggers a warning, which can be justified by the fact that the user most likely overlooked the fact that the enclosing loop is in a different subshell. However, the "break 2" in "for x in a b; do ( for y in c d; do break 2; done ) done" doesn't trigger any warning even though here too it's likely that the user overlooked the fact that the outermost loop is in a different subshell. Wdyt? Wouldn't it make sense to warn whenever one tries to reach a loop in a different subshell, not just when the first enclosing loop is in a different subshell, even though bash only does the latter?
Philippe