[Bug c/94247] Wrong char-subscripts warning for limited-range index

2020-03-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94247 --- Comment #8 from Andrew Pinski --- (In reply to Martin Sebor from comment #7) > (In reply to Jakub Jelinek from comment #6) > > No, it diagnoses the main bug > > Nope, it does not. -Wchar-subscripts is designed and documented to diagnose > a

[Bug c/94247] Wrong char-subscripts warning for limited-range index

2020-03-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94247 --- Comment #7 from Martin Sebor --- (In reply to Jakub Jelinek from comment #6) > No, it diagnoses the main bug Nope, it does not. -Wchar-subscripts is designed and documented to diagnose a common cause of a bug. The actual bug itself (which,

[Bug c/94247] Wrong char-subscripts warning for limited-range index

2020-03-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94247 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #6

[Bug c/94247] Wrong char-subscripts warning for limited-range index

2020-03-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94247 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #5

[Bug c/94247] Wrong char-subscripts warning for limited-range index

2020-03-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94247 --- Comment #3 from Richard Biener --- Yes, it's bad programming practice to use 'char' for any arithmetic.

[Bug c/94247] Wrong char-subscripts warning for limited-range index

2020-03-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94247 Richard Biener changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug c/94247] Wrong char-subscripts warning for limited-range index

2020-03-21 Thread roland.illig at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94247 --- Comment #2 from Roland Illig --- (In reply to Andrew Pinski from comment #1) > >and the compiler already knows this > Not when the warning is generated from the front-end. It does not know the > range of the char variable there. Ah, that fi

[Bug c/94247] Wrong char-subscripts warning for limited-range index

2020-03-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94247 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic --- Comment #1 from Andrew Pi