[Bug c/44677] Warn for variables incremented but not used (+=, ++)

2025-04-23 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Jakub Jelinek changed: What|Removed |Added Attachment #61175|0 |1 is obsolete|

[Bug c/44677] Warn for variables incremented but not used (+=, ++)

2025-04-23 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Jakub Jelinek changed: What|Removed |Added Attachment #61171|0 |1 is obsolete|

[Bug c/44677] Warn for variables incremented but not used (+=, ++)

2025-04-22 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 --- Comment #22 from Jakub Jelinek --- Unfinished testcase, with -Wunused-but-set-variable=1 this warns just about i in foo, with -Wunused-but-set-variable=2 about a, b, c, d, i and with -Wunused-but-set-variable=3 about a, b, c, d, e, i. No war

[Bug c/44677] Warn for variables incremented but not used (+=, ++)

2025-04-22 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 --- Comment #21 from Jakub Jelinek --- Created attachment 61171 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61171&action=edit gcc16-pr44677-wip.patch So, I tried to implement this partially, so far in the C FE. As we've been implementin

[Bug c/44677] Warn for variables incremented but not used (+=, ++)

2025-04-19 Thread eyalroz1 at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 --- Comment #20 from Eyal Rozenberg --- (In reply to Vincent Lefèvre from comment #19) > However, the i++ is not completely useless, as this is a way to tell the > compiler that the number of iterations is bounded by INT_MAX I wouldn't say that.

[Bug c/44677] Warn for variables incremented but not used (+=, ++)

2025-04-18 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 --- Comment #19 from Vincent Lefèvre --- (In reply to Andrew Pinski from comment #18) > *** Bug 119544 has been marked as a duplicate of this bug. *** The example in this bug was extern char* str; void foo(void) { int i = 0; while (*s

[Bug c/44677] Warn for variables incremented but not used (+=, ++)

2025-03-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Andrew Pinski changed: What|Removed |Added CC||peter0x44 at disroot dot org --- Comment

[Bug c/44677] Warn for variables incremented but not used (+=, ++)

2023-07-18 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Vincent Lefèvre changed: What|Removed |Added CC||vincent-gcc at vinc17 dot net --- Comm

[Bug c/44677] Warn for variables incremented but not used (+=, ++)

2022-12-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Andrew Pinski changed: What|Removed |Added Summary|Warn for variables |Warn for variables |in

[Bug c/44677] Warn for variables incremented but not used

2022-12-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Andrew Pinski changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #15 f

[Bug c/44677] Warn for variables incremented but not used

2022-09-19 Thread stormbyte at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 David Manuelda changed: What|Removed |Added CC||stormbyte at gmail dot com --- Comment

[Bug c/44677] Warn for variables incremented but not used

2022-04-08 Thread eggert at cs dot ucla.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 eggert at cs dot ucla.edu changed: What|Removed |Added CC||eggert at cs dot ucla.edu ---

[Bug c/44677] Warn for variables incremented but not used

2021-10-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Andrew Pinski changed: What|Removed |Added CC||mytbk920423 at gmail dot com --- Comment

[Bug c/44677] Warn for variables incremented but not used

2021-04-21 Thread jsm28 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Joseph S. Myers changed: What|Removed |Added CC||eyalroz1 at gmx dot com --- Comment #1

[Bug c/44677] Warn for variables incremented but not used

2020-05-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Martin Sebor changed: What|Removed |Added Last reconfirmed|2010-06-28 00:34:58 |2020-5-19 --- Comment #10 from Martin Seb

[Bug c/44677] Warn for variables incremented but not used

2019-09-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 --- Comment #9 from Jakub Jelinek --- (In reply to Martin Sebor from comment #8) > I would expect handling -Wunused-but-set-variable during Gimplification to > make detecting these sorts of things possible at least in the basic cases. That is wa

[Bug c/44677] Warn for variables incremented but not used

2019-09-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Martin Sebor changed: What|Removed |Added Blocks||89180 --- Comment #8 from Martin Sebor -

[Bug c/44677] Warn for variables incremented but not used

2017-01-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 --- Comment #7 from Jakub Jelinek --- (In reply to Martin Sebor from comment #6) > I haven't thought through the implementation challenges but defining the > extended -Wunused-but-set-variabl rule that's being suggested here seems > straightforwa

[Bug c/44677] Warn for variables incremented but not used

2017-01-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #6

[Bug c/44677] Warn for variables incremented but not used

2017-01-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #5

[Bug c/44677] Warn for variables incremented but not used

2017-01-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Martin Sebor changed: What|Removed |Added CC||dcb314 at hotmail dot com --- Comment #4

[Bug c/44677] Warn for variables incremented but not used

2016-03-05 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Manuel López-Ibáñez changed: What|Removed |Added CC||hadrien-gcc at psydk dot org --- C

[Bug c/44677] Warn for variables incremented but not used

2016-02-08 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 Manuel López-Ibáñez changed: What|Removed |Added CC||developm...@faf-ltd.com --- Commen

[Bug c/44677] Warn for variables incremented but not used

2010-06-27 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2010-06-28 00:34 --- Confirmed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Severity|norma