public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gdr at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/11856] unsigned warning in template
Date: Mon, 23 Jan 2006 01:17:00 -0000 [thread overview]
Message-ID: <20060123011740.24095.qmail@sourceware.org> (raw)
In-Reply-To: <bug-11856-781@http.gcc.gnu.org/bugzilla/>
------- Comment #10 from gdr at gcc dot gnu dot org 2006-01-23 01:17 -------
> > With this code:
> > template <typename t>
> > void f(t c) {
> > assert(0 <= c and c <= 2);
> > }
> > int main() {
> > f<unsigned char>(5);
> > }
> > I only get a warning on instantiation.
> >
> >
>
> I see, I oversimplified the problem a bit. Here is a better example:
> ------------------------------
> #include <cassert>
> template <typename Int, Int D>
> void f(Int x) {
> assert(0 <= x and x <= D);
> }
This kind of template tends to be common place for certain catgories
of codes. It is annoying. This also manifests in gcjx.
I don't know which way to go yet, but certainly it should be
controlable by -Walways-true.
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org, gdr at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11856
next prev parent reply other threads:[~2006-01-23 1:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-11856-781@http.gcc.gnu.org/bugzilla/>
2006-01-21 20:38 ` pinskia at gcc dot gnu dot org
2006-01-23 1:17 ` gdr at gcc dot gnu dot org [this message]
2006-01-23 1:23 ` gdr at cs dot tamu dot edu
2007-01-09 14:36 ` manu at gcc dot gnu dot org
2007-01-17 0:47 ` manu at gcc dot gnu dot org
2007-01-17 0:59 ` gdr at cs dot tamu dot edu
2007-01-17 1:11 ` manu at gcc dot gnu dot org
2007-01-17 1:30 ` gdr at cs dot tamu dot edu
2007-01-17 1:33 ` tromey at gcc dot gnu dot org
2007-01-17 1:46 ` gdr at cs dot tamu dot edu
2007-01-17 3:49 ` manu at gcc dot gnu dot org
2007-01-17 12:32 ` tromey at gcc dot gnu dot org
2007-01-17 13:47 ` gdr at cs dot tamu dot edu
2007-02-06 13:49 ` manu at gcc dot gnu dot org
2007-05-20 20:34 ` manu at gcc dot gnu dot org
2007-05-20 20:46 ` manu at gcc dot gnu dot org
2008-01-14 21:29 ` pinskia at gcc dot gnu dot org
2008-01-14 22:44 ` pinskia at gcc dot gnu dot org
2008-01-15 0:12 ` manu at gcc dot gnu dot org
2010-05-07 13:16 ` bangerth at gmail dot com
2010-09-06 5:25 ` pinskia at gcc dot gnu dot org
2010-09-06 5:39 ` pinskia at gcc dot gnu dot org
[not found] <bug-11856-4@http.gcc.gnu.org/bugzilla/>
2012-05-14 11:33 ` manu at gcc dot gnu.org
2012-05-14 13:09 ` jason at gcc dot gnu.org
2012-05-14 13:10 ` paolo.carlini at oracle dot com
2012-05-15 15:22 ` paolo.carlini at oracle dot com
2012-05-23 18:27 ` paolo.carlini at oracle dot com
2013-06-06 21:39 ` paolo.carlini at oracle dot com
2003-08-08 14:25 [Bug c++/11856] New: Wrong warning regarding assert o dot kullmann at swansea dot ac dot uk
2003-08-10 2:35 ` [Bug c++/11856] unsigned warning in template pinskia at gcc dot gnu dot org
2003-08-10 2:36 ` pinskia at gcc dot gnu dot org
2003-08-23 1:12 ` dhazeghi at yahoo dot com
2004-05-30 17:02 ` pinskia at gcc dot gnu dot org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060123011740.24095.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).