public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34783] New: unwanted limited range warning in template code
@ 2008-01-14 20:08 mrs at apple dot com
2008-01-14 20:42 ` [Bug c++/34783] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: mrs at apple dot com @ 2008-01-14 20:08 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 817 bytes --]
It seems silly for a project to get warnings in the below case. It seems silly
to require that one specialize just to avoid the warning.
$ cat t.cc
void bar();
template <class T>
void foo(T t) {
if (t < 257) bar();
}
void bee() {
foo(1);
foo(char(1));
}
$ g++ t.cc -c
t.cc: In function void foo(T) [with T = char]:
t.cc:9: instantiated from here
t.cc:4: warning: comparison is always true due to limited range of data type
--
Summary: unwanted limited range warning in template code
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mrs at apple dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34783
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/34783] unwanted limited range warning in template code
2008-01-14 20:08 [Bug c++/34783] New: unwanted limited range warning in template code mrs at apple dot com
@ 2008-01-14 20:42 ` pinskia at gcc dot gnu dot org
2008-01-14 21:39 ` mrs at apple dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-14 20:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-01-14 19:42 -------
You know bugzilla has a search for a reason?
*** This bug has been marked as a duplicate of 11856 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34783
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/34783] unwanted limited range warning in template code
2008-01-14 20:08 [Bug c++/34783] New: unwanted limited range warning in template code mrs at apple dot com
2008-01-14 20:42 ` [Bug c++/34783] " pinskia at gcc dot gnu dot org
@ 2008-01-14 21:39 ` mrs at apple dot com
2008-01-14 22:43 ` pinskia at gcc dot gnu dot org
2008-01-15 0:12 ` mrs at apple dot com
3 siblings, 0 replies; 5+ messages in thread
From: mrs at apple dot com @ 2008-01-14 21:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from mrs at apple dot com 2008-01-14 20:08 -------
No, that bug report has a hack around, not a fix. A fix would make it work by
default out of the box.
A fix would avoid these for templated types and leave them for non-templated
types.
--
mrs at apple dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34783
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/34783] unwanted limited range warning in template code
2008-01-14 20:08 [Bug c++/34783] New: unwanted limited range warning in template code mrs at apple dot com
2008-01-14 20:42 ` [Bug c++/34783] " pinskia at gcc dot gnu dot org
2008-01-14 21:39 ` mrs at apple dot com
@ 2008-01-14 22:43 ` pinskia at gcc dot gnu dot org
2008-01-15 0:12 ` mrs at apple dot com
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-14 22:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-01-14 21:38 -------
And that bug is not closed yet so what is the issue there?
*** This bug has been marked as a duplicate of 11856 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34783
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/34783] unwanted limited range warning in template code
2008-01-14 20:08 [Bug c++/34783] New: unwanted limited range warning in template code mrs at apple dot com
` (2 preceding siblings ...)
2008-01-14 22:43 ` pinskia at gcc dot gnu dot org
@ 2008-01-15 0:12 ` mrs at apple dot com
3 siblings, 0 replies; 5+ messages in thread
From: mrs at apple dot com @ 2008-01-15 0:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mrs at apple dot com 2008-01-14 23:21 -------
Ah, I thought someone just hadn't gotten around to moving the state to fixed,
sorry.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34783
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-14 23:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-14 20:08 [Bug c++/34783] New: unwanted limited range warning in template code mrs at apple dot com
2008-01-14 20:42 ` [Bug c++/34783] " pinskia at gcc dot gnu dot org
2008-01-14 21:39 ` mrs at apple dot com
2008-01-14 22:43 ` pinskia at gcc dot gnu dot org
2008-01-15 0:12 ` mrs at apple dot com
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).