public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21755] New: Warning from function template in system header
@ 2005-05-25 16:48 timb at bluearc dot com
2005-05-25 17:46 ` [Bug c++/21755] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: timb at bluearc dot com @ 2005-05-25 16:48 UTC (permalink / raw)
To: gcc-bugs
Options: -Wall -isystem foo
-----
# 1 "foo.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "foo.cpp"
# 1 "foo/bar.h" 1 3 4
bool bar(int i, unsigned int u)
{
return i < u;
}
template<typename T> bool baz(T i, unsigned int u)
{
return i < u;
}
# 2 "foo.cpp" 2
void foo()
{
bar(-3,5);
baz(-3,5);
}
-----
The above results in:
foo/bar.h: In function `bool baz(T, unsigned int) [with T = int]':
foo.cpp:5: instantiated from here
foo/bar.h:8: warning: comparison between signed and unsigned integer
expressions
(observed in 3.3, 3.4, 4.0). The warning should be suppressed, as foo/bar.h is
treated as a system header. It is correctly suppressed in the non-templated
function bar().
--
Summary: Warning from function template in system header
Product: gcc
Version: 3.3.6
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: timb at bluearc dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i486-linux
GCC host triplet: i486-linux
GCC target triplet: i486-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21755
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/21755] Warning from function template in system header
2005-05-25 16:48 [Bug c++/21755] New: Warning from function template in system header timb at bluearc dot com
@ 2005-05-25 17:46 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-25 17:46 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21755
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-25 17:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-25 16:48 [Bug c++/21755] New: Warning from function template in system header timb at bluearc dot com
2005-05-25 17:46 ` [Bug c++/21755] " pinskia at gcc dot gnu dot org
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).