This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71193] [6/7 Regression] error: invalid use of incomplete type
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 May 2016 04:37:44 +0000
- Subject: [Bug c++/71193] [6/7 Regression] error: invalid use of incomplete type
- Auto-submitted: auto-generated
- References: <bug-71193-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71193
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
The standard quite clearly says that this code is ill-formed, no diagnostic
required.
14.6/8: "If a hypothetical instantiation of a template immediately following
its definition would be ill-formed due to a construct that does not depend on a
template parameter, the program is ill-formed; no diagnostic is required. If
the interpretation of such a construct in the hypothetical instantiation is
different from the interpretation of the corresponding construct in any actual
instantiation of the template, the program is ill-formed; no diagnostic is
required. [ Note: This can happen in situations including the following:
* a type used in a non-dependent name is incomplete at the point at which a
template is defined but is complete at the point at which an instantiation is
performed, ...."