This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36656] New: useless warning: type qualifiers ignored on function return type in template code
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2008 17:44:28 -0000
- Subject: [Bug c++/36656] New: useless warning: type qualifiers ignored on function return type in template code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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