public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36656]  New: useless warning: type qualifiers ignored on function return type in template code
@ 2008-06-27 17:45 sebor at roguewave dot com
  2008-06-27 17:47 ` [Bug c++/36656] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: sebor at roguewave dot com @ 2008-06-27 17:45 UTC (permalink / raw)
  To: gcc-bugs

The warning below is unhelpful in generic code and silencing it by removing
the top-level cv qualifiers is unnecessarily tedious.

$ cat t.cpp && g++ t.cpp -W
template <class T>
T foo () { return T (); }

int main ()
{
    foo<const int>();
}
t.cpp: In function 'int main()':
t.cpp:2: warning: type qualifiers ignored on function return type


-- 
           Summary: useless warning: type qualifiers ignored on function
                    return type in template code
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com


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


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

* [Bug c++/36656] useless warning: type qualifiers ignored on function return type in template code
  2008-06-27 17:45 [Bug c++/36656] New: useless warning: type qualifiers ignored on function return type in template code sebor at roguewave dot com
@ 2008-06-27 17:47 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-06-27 17:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-06-27 17:46 -------


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


-- 

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=36656


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

end of thread, other threads:[~2008-06-27 17:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-27 17:45 [Bug c++/36656] New: useless warning: type qualifiers ignored on function return type in template code sebor at roguewave dot com
2008-06-27 17:47 ` [Bug c++/36656] " 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).