public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99583] New: Parameter packs not expanded in lambda noexcept specifier
@ 2021-03-14  8:13 hewillk at gmail dot com
  2021-03-15  8:47 ` [Bug c++/99583] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hewillk at gmail dot com @ 2021-03-14  8:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99583

            Bug ID: 99583
           Summary: Parameter packs not expanded in lambda noexcept
                    specifier
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

The following valid code failed since gcc-4.7

void f(...);

template <bool... B> 
void g() {  
 f([]() noexcept(B) {} ...);  
}

(goldbot: https://gcc.godbolt.org/z/WoKaab)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/99583] Parameter packs not expanded in lambda noexcept specifier
  2021-03-14  8:13 [Bug c++/99583] New: Parameter packs not expanded in lambda noexcept specifier hewillk at gmail dot com
@ 2021-03-15  8:47 ` rguenth at gcc dot gnu.org
  2021-04-01 20:07 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-15  8:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99583

Richard Biener <rguenth at gcc dot gnu.org> 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 <rguenth at gcc dot gnu.org> ---
Confirmed.

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

clang accepts it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/99583] Parameter packs not expanded in lambda noexcept specifier
  2021-03-14  8:13 [Bug c++/99583] New: Parameter packs not expanded in lambda noexcept specifier hewillk at gmail dot com
  2021-03-15  8:47 ` [Bug c++/99583] " rguenth at gcc dot gnu.org
@ 2021-04-01 20:07 ` cvs-commit at gcc dot gnu.org
  2021-04-01 20:08 ` jason at gcc dot gnu.org
  2021-04-15 19:03 ` cvs-commit at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-01 20:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99583

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

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

commit r11-7953-g0cf4813202f19768e31666f6aa82bde4dce4065a
Author: Jason Merrill <jason@redhat.com>
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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/99583] Parameter packs not expanded in lambda noexcept specifier
  2021-03-14  8:13 [Bug c++/99583] New: Parameter packs not expanded in lambda noexcept specifier hewillk at gmail dot com
  2021-03-15  8:47 ` [Bug c++/99583] " rguenth at gcc dot gnu.org
  2021-04-01 20:07 ` cvs-commit at gcc dot gnu.org
@ 2021-04-01 20:08 ` jason at gcc dot gnu.org
  2021-04-15 19:03 ` cvs-commit at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-01 20:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99583

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Same issue.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/99583] Parameter packs not expanded in lambda noexcept specifier
  2021-03-14  8:13 [Bug c++/99583] New: Parameter packs not expanded in lambda noexcept specifier hewillk at gmail dot com
                   ` (2 preceding siblings ...)
  2021-04-01 20:08 ` jason at gcc dot gnu.org
@ 2021-04-15 19:03 ` cvs-commit at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-15 19:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99583

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

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

commit r11-8201-g2efbbba16a0630fac8cadcd6d9e0ffaabfadb79f
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Apr 15 13:38:54 2021 -0400

    c++: noexcept error recursion [PR100101]

    Here instantiating the noexcept-specifier for bar<void>() means
    instantiating A<void>::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<void>::type, which again wants to
    instantiate A<void>::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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-15 19:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14  8:13 [Bug c++/99583] New: Parameter packs not expanded in lambda noexcept specifier hewillk at gmail dot com
2021-03-15  8:47 ` [Bug c++/99583] " rguenth at gcc dot gnu.org
2021-04-01 20:07 ` cvs-commit at gcc dot gnu.org
2021-04-01 20:08 ` jason at gcc dot gnu.org
2021-04-15 19:03 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).