[Bug c++/10416] 'unused variable' warning ignores ctor/dtor side-effects

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 20 11:50:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10416

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|gcc-bugs at gcc dot gnu.org |
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com
   Target Milestone|---                         |4.8.0

--- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-08-20 11:50:38 UTC ---
For the new Wunused_but_set_variable warning, handled nearby, we actually
check:

           && (!CLASS_TYPE_P (TREE_TYPE (decl))
               || !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (decl))))

Doing the same for Wunused_variable too looks like progress to me.



More information about the Gcc-bugs mailing list