This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59231] [4.8/4.9 Regression] gcc misses [-Werror=sign-compare] when inside a template
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Jan 2014 18:21:45 +0000
- Subject: [Bug c++/59231] [4.8/4.9 Regression] gcc misses [-Werror=sign-compare] when inside a template
- Auto-submitted: auto-generated
- References: <bug-59231-4 at http dot gcc dot gnu dot org/bugzilla/>
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.