This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why is this diagnostic only reported with -pedantic?
The code in baz() is perfectly legal since ISO C++ allows void
returns. -pedantic should not warn about it because it is not a GCC
extension
at all. Would you please file a bugreport about the incorrect warning
emitted
for baz()?
Actually don't because the orginal code was run over the C front-end
where this
is a GCC extension. The C++ front-end does the correct thing in that
it does
not warn/error out about the return value at all.
-- Pinski