[Bug c++/71456] missing -Wunused-variable on a static global initialized with another

2017-07-20 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71456

egallager at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-07-20
 CC||egallager at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #5 from egallager at gcc dot gnu.org ---
Confirming that the warning is still missing

[Bug c++/71456] missing -Wunused-variable on a static global initialized with another

2016-06-09 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71456

--- Comment #4 from Eric Gallager  ---
(In reply to Martin Sebor from comment #3)
> (In reply to Eric Gallager from comment #2)
> > Speaking of -Wglobal-constructors, FSF GCC doesn't support this option. Is
> > there a bug open for adding it? I couldn't find one when searching.
> 
> I couldn't find it either.  It might be a useful feature to request, either
> independent of this bug, or as part of it.

Okay, I opened bug 71482 for it.

[Bug c++/71456] missing -Wunused-variable on a static global initialized with another

2016-06-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71456

--- Comment #3 from Martin Sebor  ---
(In reply to Eric Gallager from comment #2)
> Speaking of -Wglobal-constructors, FSF GCC doesn't support this option. Is
> there a bug open for adding it? I couldn't find one when searching.

I couldn't find it either.  It might be a useful feature to request, either
independent of this bug, or as part of it.

[Bug c++/71456] missing -Wunused-variable on a static global initialized with another

2016-06-09 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71456

Eric Gallager  changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #2 from Eric Gallager  ---
(In reply to Martin Sebor from comment #0)
> (Clang only diagnoses the dynamic initialization with potential side-effects
> with -Wglobal-constructors, and regardless of whether the static variable is
> used or not.)

Speaking of -Wglobal-constructors, FSF GCC doesn't support this option. Is
there a bug open for adding it? I couldn't find one when searching.

[Bug c++/71456] missing -Wunused-variable on a static global initialized with another

2016-06-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71456

Richard Biener  changed:

   What|Removed |Added

   Keywords||diagnostic,
   ||missed-optimization

--- Comment #1 from Richard Biener  ---
Optimizing dynamic initialization is indeed a missed feature.