[Bug c++/69723] pre-post-increment/decrement and reading the same variable that is assigned should not be considered uses for Wunused-but-set-variable

2016-02-09 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69723 --- Comment #8 from Manuel López-Ibáñez --- (In reply to Jakub Jelinek from comment #7) > As for the missed -Wuninitialized at -O0, wonder if we couldn't do something > about it for GCC 7. Sounds good to me, but perhaps it is better to open a

[Bug c++/69723] pre-post-increment/decrement and reading the same variable that is assigned should not be considered uses for Wunused-but-set-variable

2016-02-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69723 --- Comment #7 from Jakub Jelinek --- As for the missed -Wuninitialized at -O0, wonder if we couldn't do something about it for GCC 7. volatile int v; void bar (void) { int x; v++; for (; x < 100; x++) v++; v++; } Here, we have # x_1

[Bug c++/69723] pre-post-increment/decrement and reading the same variable that is assigned should not be considered uses for Wunused-but-set-variable

2016-02-09 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69723 --- Comment #9 from Manuel López-Ibáñez --- (In reply to Jakub Jelinek from comment #7) > As for the missed -Wuninitialized at -O0, wonder if we couldn't do something > about it for GCC 7. Note that people do complain a lot about this case:

[Bug c++/69723] pre-post-increment/decrement and reading the same variable that is assigned should not be considered uses for Wunused-but-set-variable

2016-02-08 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69723 Manuel López-Ibáñez changed: What|Removed |Added Keywords||diagnostic