On 6/19/20 2:39 PM, Nicholas Krause wrote:
This fixs the PR95672 by adding the missing TYPE_PACK_EXPANSION case in
cxx_incomplete_type_diagnostic in order to avoid ICES on diagnosing
incomplete template pack expansion cases.
Signed-off-by: Nicholas Krause <xerofo...@gmail.com>
Changelog:
*cp/type2ck.c: Add missing case TYPE_PACK_EXPANSION for diagnosticing
The filename is misspelled here; git gcc-verify would catch that for you.
"diagnosing".
incomplete parameter pack expansion in cxx_incomplete_type_diagnostic
in order to avoid ICEing here.
---
gcc/cp/typeck2.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 5fd3b82..dc5bd5e 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -552,6 +552,11 @@ cxx_incomplete_type_diagnostic (location_t loc, const_tree
value,
TYPE_NAME (type));
break;
+ case TYPE_PACK_EXPANSION:
+ emit_diagnostic(diag_kind, loc, 0,
Space before (.
+ "invalid expansion of template expansion parameter %qT",
Let's just say "invalid use of pack expansion", there's no parameter here.
+ PACK_EXPANSION_PATTERN(type));
Space before (.
+ break;
Blank line after break.
case TYPENAME_TYPE:
case DECLTYPE_TYPE:
emit_diagnostic (diag_kind, loc, 0,
You also need to include the testcase in your patch.
Thanks,
Jason