This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11856] unsigned warning in template
- From: "gdr at cs dot tamu dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2007 01:46:37 -0000
- Subject: [Bug c++/11856] unsigned warning in template
- References: <bug-11856-781@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #18 from gdr at cs dot tamu dot edu 2007-01-17 01:46 -------
Subject: Re: unsigned warning in template
"tromey at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| A flag to control the warning does not provide
| fine enough granularity of control.
Indeed.
| That is, sometimes
| the warning is appropriate, and disabling the warning
| would let through code that you would prefer not to let through.
Indeed.
The particularity of this PR is that it involves only constants.
It that case, the compiler should just elide the warning. That would
be a first order approximation of a solution to this issue.
| One idea would be to disable the warning if the expression involves
| types which came from a template instantiation (sorry, I don't know
| the C++ terminology for this).
Please, don't sorry about the terminology. The particularity of such
expressions is that they are constants. And I would like we solve
this not just for template arguments, but of such comparaison
involving constants.
Tom, what do you think?
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11856