Open r-barnes opened 1 month ago
Yes. In both cases, we've just read the closing token <!EndOfComponent>
and are falling through the default case, or didn't read any tokens at all, and breaking the loop at the first iteration.
[[fallthrough]]
would be nice indeed. I guess the C++17 compiler yells at you? A C++14-compatible alternative is to repeat end_loop = true;
and have the case end with the break;
@jtrmal, @danpovey, we are C++17 by default now, ain't we? No longer C++14? I can't think of a compiler that wouldn't C++17 these days.
Are these implicit fallthroughs intentional? If so, can we mark them with
[[fallthrough]]
?https://github.com/kaldi-asr/kaldi/blob/122a3f239ed2f24271eb61b9aa3060fa06b820ac/src/nnet/nnet-convolutional-component.h#L157
https://github.com/kaldi-asr/kaldi/blob/122a3f239ed2f24271eb61b9aa3060fa06b820ac/src/nnet/nnet-sentence-averaging-component.h#L100