[Bug c++/84698] ICE when using noexcept(noexcept()) declaration on global friend function of template class

2019-06-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84698

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marek Polacek  ---
Fixed.

[Bug c++/84698] ICE when using noexcept(noexcept()) declaration on global friend function of template class

2019-06-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84698

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Tue Jun 18 21:50:51 2019
New Revision: 272443

URL: https://gcc.gnu.org/viewcvs?rev=272443=gcc=rev
Log:
PR c++/84698
* g++.dg/cpp0x/noexcept42.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept42.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/84698] ICE when using noexcept(noexcept()) declaration on global friend function of template class

2019-06-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84698

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

--- Comment #2 from Marek Polacek  ---
Fixed by r270005.  I think I'll add the testcase.

[Bug c++/84698] ICE when using noexcept(noexcept()) declaration on global friend function of template class

2018-03-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84698

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-08
 CC||jason at gcc dot gnu.org,
   ||msebor at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Sebor  ---
Confirmed.  Bisection points to r209907 (gcc 4.10.0):

r209907 | jason | 2014-04-29 14:04:50 -0400 (Tue, 29 Apr 2014) | 27 lines

DR 1351
Represent the unevaluated exception specification of an implicitly
declared or deleted function with a simple placeholder, not a list
of functions.

Before then GCC errors out with:

pr84698.C: In instantiation of ‘struct X’:
pr84698.C:15:14:   required from here
pr84698.C:7:14: error: declaration of ‘template void
swap(X&, X&) noexcept ()’ has a different
exception specifier
  friend void swap(X& a, X& b) noexcept(noexcept(a.swap(b)));
  ^
pr84698.C:11:13: error: from previous declaration ‘template
void swap(X&, X&) noexcept (noexcept (a.swap(b)))’
 inline void swap(X& a, X& b) noexcept(noexcept(a.swap(b))) {
 ^