This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: incomplete type return types
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: jason at redhat dot com, gcc at gcc dot gnu dot org
- Date: Tue, 29 Nov 2005 12:52:44 -0800
- Subject: Re: incomplete type return types
- References: <m3veybi0rl.fsf@uniton.integrable-solutions.net>
Gabriel Dos Reis wrote:
> The resason here is that, after we complained that A is incomplete
> (therefore cannot be used as return type in the function definition),
> cp/decl.c:check_function_type() changes the return type to void, thus
> giving misleading diagnostic later.
That's the bug. It should change the return type to error_mark_node,
and then the code that check returns should be silent in that case.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304