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

l.lunak at suse dot cz gcc-bugzilla@gcc.gnu.org
Sun Nov 4 11:04:00 GMT 2012


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

Lubos Lunak <l.lunak at suse dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #1 from Lubos Lunak <l.lunak at suse dot cz> 2012-11-04 11:04:01 UTC ---
As the compiler cannot tell for sure in some cases, such as the ctor calling an
external function, the only reasonable way of handling this I see is explicit
tagging of types for which there should be an unused warning if only ctor/dtor
are called for a variable. Here's my attempt at attribute warn_unused.



More information about the Gcc-bugs mailing list