[Bug c++/69723] Inconsistent report of unused and uninitialized variables

2016-02-08 Thread developm...@faf-ltd.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69723 --- Comment #5 from Peter VARGA --- I do not understand what you mean with "Replace unused++ with unused = unused + 1". How ever. I checked my example code in Compiler Explorer with clang and clang generates a warning as it should be. OK. You

[Bug c++/69723] Inconsistent report of unused and uninitialized variables

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 CC||manu at gcc dot gnu.org --- Commen

[Bug c++/69723] Inconsistent report of unused and uninitialized variables

2016-02-08 Thread developm...@faf-ltd.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69723 --- Comment #3 from Peter VARGA --- Dear Jakob, thank you for the explanation. But honestly, the "definition" when to warn is in my eyes wrong. Even var++ is reading and then setting the variable in this case it does NOT make sense! Just imagin

[Bug c++/69723] Inconsistent report of unused and uninitialized variables

2016-02-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69723 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2

[Bug c++/69723] Inconsistent report of unused and uninitialized variables

2016-02-08 Thread developm...@faf-ltd.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69723 --- Comment #1 from Peter VARGA --- Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.9.3_source/configure --disa