This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/68114] gcc doesn't show error when return type of deleted function is incomplete


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]