Re: [C PATCH] Better location for switch warnings (PR c/30020)

2014-06-04 Thread Jeff Law
On 06/04/14 00:46, Marek Polacek wrote: It is trivial to pass the location from c_add_case_label down to check_case_bounds, so do that. With it, we instead of i.c:4:3: warning: case label value is less than minimum value for type switch (c) { case 42: case -1: return -1; }; ^ output i.c

[C PATCH] Better location for switch warnings (PR c/30020)

2014-06-03 Thread Marek Polacek
It is trivial to pass the location from c_add_case_label down to check_case_bounds, so do that. With it, we instead of i.c:4:3: warning: case label value is less than minimum value for type switch (c) { case 42: case -1: return -1; }; ^ output i.c:4:25: warning: case label value is less tha