[Bug c++/30601] [4.3 regression] -Wreturn-type warns about more than what the documentation says
bangerth at math dot tamu dot edu
gcc-bugzilla@gcc.gnu.org
Fri Jan 26 22:59:00 GMT 2007
------- Comment #11 from bangerth at math dot tamu dot edu 2007-01-26 22:59 -------
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'.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30601
More information about the Gcc-bugs
mailing list