This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/59231] [4.8/4.9 Regression] gcc misses [-Werror=sign-compare] when inside a template


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |paolo.carlini at oracle dot com
         Depends on|                            |11856

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
In retrospect, I think that change (which I suggested) was wrong.  We don't
want to suppress all warnings just because we're in a template;
c_inhibit_evaluation_warnings should only be used when we aren't actually
generating code for an expression.

A better solution for 11856 would be to disable just -Wtype-limits in template
instantiations, or even just across the build_x_binary_op if the expression
before substitution is type-dependent.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]