This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21117] [3.4/4.0/4.1 Regression] ICE after error about returning an incomplete type
- From: "rth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Aug 2005 23:38:37 -0000
- Subject: [Bug c++/21117] [3.4/4.0/4.1 Regression] ICE after error about returning an incomplete type
- References: <20050420001653.21117.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rth at gcc dot gnu dot org 2005-08-05 23:38 -------
Front end bug.
error ("return type %q#T is incomplete", TREE_TYPE (fntype));
/* Make it return void instead, but don't change the
type of the DECL_RESULT, in case we have a named return value. */
This is in fact the problem. If you don't want to make the DECL_RESULT be
VOIDtype (due to follow-on errors), then you need to make it error_mark_node.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |c++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21117