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; 5+ 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] 5+ 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; 5+ 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] 5+ messages in thread

* [Bug c++/21755] Warning from function template in system header
       [not found] <bug-21755-3259@http.gcc.gnu.org/bugzilla/>
  2005-11-21 23:06 ` pinskia at gcc dot gnu dot org
  2007-07-13 22:56 ` geoffk at gcc dot gnu dot org
@ 2007-07-13 23:13 ` pcarlini at suse dot de
  2 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2007-07-13 23:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pcarlini at suse dot de  2007-07-13 23:13 -------
I think this is really a duplicate of c++/30500.

*** This bug has been marked as a duplicate of 30500 ***


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21755


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/21755] Warning from function template in system header
       [not found] <bug-21755-3259@http.gcc.gnu.org/bugzilla/>
  2005-11-21 23:06 ` pinskia at gcc dot gnu dot org
@ 2007-07-13 22:56 ` geoffk at gcc dot gnu dot org
  2007-07-13 23:13 ` pcarlini at suse dot de
  2 siblings, 0 replies; 5+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2007-07-13 22:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from geoffk at gcc dot gnu dot org  2007-07-13 22:56 -------
I'm not even sure this is a bug; maybe it's a clue that you should have
instantiated baz() with an unsigned type.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21755


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/21755] Warning from function template in system header
       [not found] <bug-21755-3259@http.gcc.gnu.org/bugzilla/>
@ 2005-11-21 23:06 ` pinskia at gcc dot gnu dot org
  2007-07-13 22:56 ` geoffk at gcc dot gnu dot org
  2007-07-13 23:13 ` pcarlini at suse dot de
  2 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-21 23:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-21 23:06 -------
Confirmed, not a regression.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |2.95.3 3.4.0 4.0.0 3.3.3
                   |                            |3.2.3 3.0.4 4.1.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-21 23:06:24
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21755


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-13 23:13 UTC | newest]

Thread overview: 5+ 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
     [not found] <bug-21755-3259@http.gcc.gnu.org/bugzilla/>
2005-11-21 23:06 ` pinskia at gcc dot gnu dot org
2007-07-13 22:56 ` geoffk at gcc dot gnu dot org
2007-07-13 23:13 ` pcarlini at suse dot de

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).