[Bug c++/67825] [concepts] expression constraint bug when taking address of a member function

2020-04-21 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67825

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Patrick Palka :

https://gcc.gnu.org/g:05f14938111e34edd272628a9268444256735e10

commit r10-7862-g05f14938111e34edd272628a9268444256735e10
Author: Patrick Palka 
Date:   Tue Apr 21 22:18:50 2020 -0400

c++: Diagnose invalid use of member function in requires

This updates diagnose_valid_expression to mirror the convert_to_void check
added
to tsubst_valid_expression_requirement by r10-7554.

gcc/cp/ChangeLog:

PR c++/67825
* constraint.cc (diagnose_valid_expression): Check convert_to_void
here
as well as in tsubst_valid_expression_requirement.

gcc/testsuite/ChangeLog:

PR c++/67825
* g++.dg/concepts/diagnostic10.C: New test.
* g++.dg/cpp2a/concepts-pr67178.C: Adjust dg-message.

[Bug c++/67825] [concepts] expression constraint bug when taking address of a member function

2020-04-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67825

Jason Merrill  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Target Milestone|--- |10.0
 Status|ASSIGNED|RESOLVED

--- Comment #3 from Jason Merrill  ---
Actually fixed for GCC 10.

[Bug c++/67825] [concepts] expression constraint bug when taking address of a member function

2020-04-04 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67825

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

https://gcc.gnu.org/g:f1ad7bac76b662577e3bde78c530954099361a66

commit r10-7554-gf1ad7bac76b662577e3bde78c530954099361a66
Author: Jason Merrill 
Date:   Sat Apr 4 11:04:55 2020 -0400

c++: Fix invalid pointer-to-member in requires [PR67825]

A recent change to cmcstl2 led to two tests failing due to this bug: our
valid expression checking in the context of a requires-expression wasn't
catching that an expression of member function type can only appear as the
function operand of a call expression.  Fixed by using convert_to_void to
do
the same checking as a discarded-value expression.

This patch also fixes 67825, which already had a testcase, but the testcase
was testing for the wrong behavior.

gcc/cp/ChangeLog
2020-04-04  Jason Merrill  

PR c++/67825
* constraint.cc (tsubst_valid_expression_requirement): Call
convert_to_void.

[Bug c++/67825] [concepts] expression constraint bug when taking address of a member function

2020-04-03 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67825

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Last reconfirmed||2020-04-04
 Ever confirmed|0   |1

[Bug c++/67825] [concepts] expression constraint bug when taking address of a member function

2019-09-05 Thread andrew.n.sutton at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67825

Andrew Sutton  changed:

   What|Removed |Added

 CC||andrew.n.sutton at gmail dot 
com

--- Comment #1 from Andrew Sutton  ---
Created attachment 46833
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46833&action=edit
Patch against concepts-cxx2a to add test (git format-patch format)

This appears to have been fixed in concepts-cxx2a. Patch adds a test for the
PR.