This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68114] gcc doesn't show error when return type of deleted function is incomplete
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 27 Oct 2015 22:41:58 +0000
- Subject: [Bug c++/68114] gcc doesn't show error when return type of deleted function is incomplete
- Auto-submitted: auto-generated
- References: <bug-68114-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68114
Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #1 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
I disagree. According to [dcl.fct] p11 of the current working draft:
"The type of a parameter or the return type for a function definition shall not
be an incomplete (possibly cv-qualified) class type in the context of the
function
definition unless the function is deleted (8.4.3)."
This wording came in via
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1394
Clang does not accept the code example, but that looks like a clang defect to
me.