------- Comment #15 from bangerth at dealii dot org 2008-07-10 03:38 ------- (In reply to comment #11) > Subject: Re: [4.3 regression] -Wreturn-type warns about more > than what the documentation says > > > > I think this was done on purpose. > > It is contrary to what the documentation says. I think it also doesn't > make much sense in C++ if the return type results from a template > substitution. For example, the following case is rather common: > > template <typename T> class Array { > T& operator(); > T operator() const; > }; > > This class will trigger a warning if instantiated as Array<const double> > because the return type of the second operator() is now 'const double'.
This issue has now been addressed with the most recent patch for PR 36760. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30601