Re: Missing warning opportunity - code after break;

2017-06-21 Thread Soul Studios
Doesn't look like I can create a GCC bugzilla account, but 7 years? Wow. On 20/06/2017 3:48 p.m., Eric Gallager wrote: On 6/19/17, Soul Studios wrote: Just noticed this: while(something) { // stuff if (num_elements == 0) { break; --curr

Re: Missing warning opportunity - code after break;

2017-06-19 Thread Eric Gallager
On 6/19/17, Soul Studios wrote: > Just noticed this: > while(something) > { > // stuff > > if (num_elements == 0) > { > break; > --current_group; > } > } > > doesn't trigger a warning in GCC 5.1, 6.3 and 7.1. The line after > "break;" is unused,

Missing warning opportunity - code after break;

2017-06-19 Thread Soul Studios
Just noticed this: while(something) { // stuff if (num_elements == 0) { break; --current_group; } } doesn't trigger a warning in GCC 5.1, 6.3 and 7.1. The line after "break;" is unused, probably should be before the break, ie. user