cp:
commit49eec3d78022cc7a1707b8dbb17feb4033dbc9cd
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Oct 2005 18:02:52 +0000 (12 18:02 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Oct 2005 18:02:52 +0000 (12 18:02 +0000)
tree28c8ceb85e19b95157c495f5cb3810b89e15b055
parent49ccd43f66394acad9b456304de3631fdf19ee6d
cp:
PR c++/21117
* decl.c (check_function_type): Correctly overwrite incomplete
return type with void type.
* typeck.c (check_return_expr): If the function's return type is
void, don't try and convert a return expr.
testsuite:
PR c++/21117
* g++.dg/other/return1.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105310 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/return1.C [new file with mode: 0644]