This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] named return values and return without value warnings
On Sun, Oct 08, 2000 at 10:57:16AM -0700, Mark Mitchell wrote:
> Richard> Frankly, that's my vote as well, but before I the effort
> Richard> is invested in tweeking that many test cases I'd prefer
> Richard> to have buy-in from the front-end folk.
>
> I'm sorry -- I'm a little lost. We're not seeing warnings on some of
> these test-cases any more because warn_return_type isn't on by
> default, is that the issue?
Yes. There were 5 test cases that had expected warnings that
we no longer got if warn_return_type was off. If I turn
warn_return_type on by default, there are about 70 test cases
that fail because of excess warnings.
> One problem here is that I think we wanted to warn about falling off
> the end of functions that never get turned into RTL. (That happens
> rather much in the presence of inlined functions.)
I agree that that is a nice thing to have, but the bits I
deleted were using can_reach_end, which implies rtl. So
I'm a bit confused by your statement.
> So, I'm not sure where to go from here.
I dunno. We could do nothing, but then we'd have no fall off the
end of the function warning by default, which is I think a mistake.
That one's serious (and common) enough that I think we ought not
require -Wall or whatnot for detection.
r~