[Bug c++/99583] Parameter packs not expanded in lambda noexcept specifier

2021-04-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99583

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

https://gcc.gnu.org/g:2efbbba16a0630fac8cadcd6d9e0ffaabfadb79f

commit r11-8201-g2efbbba16a0630fac8cadcd6d9e0ffaabfadb79f
Author: Jason Merrill 
Date:   Thu Apr 15 13:38:54 2021 -0400

c++: noexcept error recursion [PR100101]

Here instantiating the noexcept-specifier for bar() means
instantiating A::value, which complains about the conversion from 0
to
int* in the default argument of foo.  Since my patch for PR99583, printing
the error context involves looking at C::type, which again wants to
instantiate A::value, which breaks.  For now at least, let's break
this recursion by avoiding looking into the noexcept-specifier in
find_typenames, and limit that to just the uses_parameter_packs case that
PR99583 cares about.

gcc/cp/ChangeLog:

PR c++/100101
PR c++/99583
* pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
TYPE_RAISES_EXCEPTIONS here.
* tree.c (cp_walk_subtrees): Not here.

gcc/testsuite/ChangeLog:

PR c++/100101
* g++.dg/cpp0x/noexcept67.C: New test.

[Bug c++/99583] Parameter packs not expanded in lambda noexcept specifier

2021-04-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99583

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org
 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #3 from Jason Merrill  ---
Same issue.

*** This bug has been marked as a duplicate of bug 99584 ***

[Bug c++/99583] Parameter packs not expanded in lambda noexcept specifier

2021-04-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99583

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

https://gcc.gnu.org/g:0cf4813202f19768e31666f6aa82bde4dce4065a

commit r11-7953-g0cf4813202f19768e31666f6aa82bde4dce4065a
Author: Jason Merrill 
Date:   Thu Apr 1 15:17:40 2021 -0400

c++: variadic lambda noexcept-specifier [PR99583]

The tree-walk looking for parameter packs didn't find this one because we
weren't stepping into TYPE_RAISES_EXCEPTIONS.

gcc/cp/ChangeLog:

PR c++/99583
PR c++/99584
* tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
TYPE_RAISES_EXCEPTIONS.

gcc/testsuite/ChangeLog:

PR c++/99583
* g++.dg/cpp0x/lambda/lambda-variadic12.C: New test.

[Bug c++/99583] Parameter packs not expanded in lambda noexcept specifier

2021-03-15 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99583

Richard Biener  changed:

   What|Removed |Added

   Keywords||rejects-valid
   Last reconfirmed||2021-03-15
Version|4.7.0   |10.2.1
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
  Known to fail||10.2.0, 11.0, 7.5.0

--- Comment #1 from Richard Biener  ---
Confirmed.

> g++-10 -S t.C
t.C: In function 'void g()':
t.C:5:24: error: expansion pattern '' contains no parameter packs
5 |  f([]() noexcept(B) {} ...);
  |^~~

clang accepts it.