This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/36656] New: useless warning: type qualifiers ignored on function return type in template code


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]