------- Comment #5 from pinskia at gcc dot gnu dot org 2006-01-27 01:01 -------
(In reply to comment #4)
> No need to further change language.
Change what language? C++?
Well it is part of the C++ standard.
6.6.3/2:
A return statement with an expression of type "cv void" can be used only in
functions with a return type of cv void; the expression is evaluated just
before the function returns to its caller.
Which means:
int f(void);
void g(void)
{
return (void)f();
}
is also valid.
So the warning is useless as this is explicated in the C++ standard.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25986