[Bug c++/55203] No unused warning for variables of non-trivial types

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 20 16:28:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55203

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org

--- Comment #14 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #13)

I would also find it preferable to have the warning issued by default without
requiring a special attribute to request it.  (The unused warning can
suppressed by annotating each unused object with attribute unused.  Whether or
not the object's ctor has side-effects seems orthogonal to whether the object
is actually used.)

Please see also bug 71456 and bug 71402 for some additional background and
discussion of the pros and cons of the approaches mentioned there.


More information about the Gcc-bugs mailing list