[Bug c++/68386] error: invalid initialization of reference of type 'void (&&)()' from expression of type 'void()'

2021-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68386

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
  Known to work||6.4.0, 7.1.0
 Status|NEW |RESOLVED
   Target Milestone|--- |6.4

--- Comment #3 from Andrew Pinski  ---
Fixed in GCC 6.4.0 and GCC7+.

This is a dup of bug 80176.

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

[Bug c++/68386] error: invalid initialization of reference of type 'void (&&)()' from expression of type 'void()'

2016-01-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68386

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-23
 Ever confirmed|0   |1

--- Comment #2 from Andrew Pinski  ---
Confirmed.

[Bug c++/68386] error: invalid initialization of reference of type 'void (&&)()' from expression of type 'void()'

2015-11-17 Thread schaub.johannes at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68386

Johannes Schaub  changed:

   What|Removed |Added

 CC||schaub.johannes@googlemail.
   ||com

--- Comment #1 from Johannes Schaub  ---
This can be further reduced to 

struct A { static void mf() { } };

int main() {
   A a;
   void ()() = a.mf; // error
}