[Bug c++/86142] hard error for bad delete-expression in SFINAE context

2020-05-20 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86142

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |10.0
Version|unknown |9.3.0

[Bug c++/86142] hard error for bad delete-expression in SFINAE context

2020-05-19 Thread ensadc at mailnesia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86142

ensadc at mailnesia dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to work||10.1.0
  Known to fail||9.3.0
 Resolution|--- |FIXED

--- Comment #3 from ensadc at mailnesia dot com ---
Fixed in GCC 10

[Bug c++/86142] hard error for bad delete-expression in SFINAE context

2020-05-14 Thread ensadc at mailnesia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86142

--- Comment #2 from ensadc at mailnesia dot com ---
I was misled by Clang. Seems like there's a Clang bug then.

[Bug c++/86142] hard error for bad delete-expression in SFINAE context

2020-05-12 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86142

Patrick Palka  changed:

   What|Removed |Added

 CC||ppalka at gcc dot gnu.org

--- Comment #1 from Patrick Palka  ---
Looks ever since r10-2197, GCC 10 correctly performs SFINAE for the first two
overloaded calls.

But could you explain why

  int z = f();

should resolve to the second overload of f?

My understanding is that 'delete' on a pointer to void is undefined behavior,
but is not ill-formed, so there is no substitution failure and we should select
the first overload.