[Bug c++/100198] [12 Regression] ICE with enum in lambda in pack expansion

2022-01-27 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100198

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:4d2efec9f229c2e2e7cb6c3f06beb4c3e9d244a1

commit r12-6909-g4d2efec9f229c2e2e7cb6c3f06beb4c3e9d244a1
Author: Jason Merrill 
Date:   Thu Jan 27 17:46:43 2022 -0500

c++: pack in enumerator in lambda [PR100198]

The GCC 8 lambda overhaul fixed most uses of lambdas in pack expansions,
but
local enums and classes within such lambdas that depend on parameter packs
are still broken.  For now, give a sorry instead of an ICE or incorrect
error.

PR c++/100198
PR c++/100030
PR c++/100282

gcc/cp/ChangeLog:

* parser.cc (cp_parser_enumerator_definition): Sorry on parameter
pack in lambda.
(cp_parser_class_head): And in class attributes.
* pt.cc (check_for_bare_parameter_packs): Sorry instead of error
in lambda.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/lambda/lambda-variadic13.C: Accept the sorry
as well as the correct error.
* g++.dg/cpp0x/lambda/lambda-variadic14.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-variadic14a.C: New test.
* g++.dg/cpp0x/lambda/lambda-variadic15.C: New test.
* g++.dg/cpp0x/lambda/lambda-variadic16.C: New test.

[Bug c++/100198] [12 Regression] ICE with enum in lambda in pack expansion

2022-01-18 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100198

--- Comment #4 from Jason Merrill  ---
Nested classes/enums like this are broken in pack expansions if they depend on
parameter packs.  The patch for PR100109 changed this from rejects-valid to
ice-on-valid, but it isn't something newly broken.  I suppose I could change it
back to rejects-valid by reverting the PR100109 patch, but that's just trading
one ICE for another.

This functionality isn't going to be implemented for GCC 12.

[Bug c++/100198] [12 Regression] ICE with enum in lambda in pack expansion

2022-01-17 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100198

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
   Keywords||needs-bisection