Skip to content
Snippets Groups Projects
Commit c4792bd1 authored by Jason Merrill's avatar Jason Merrill
Browse files

c++: constexpr PMF conversion [PR105996]

Here, we were calling build_reinterpret_cast regardless of whether there was
actually a cast, and that now sets REINTERPRET_CAST_P.  But that
optimization seems dodgy anyway, as it involves NOP_EXPR from one
RECORD_TYPE to another and we try to reserve NOP_EXPR for fundamental types.
And the generated code seems the same, so let's drop it.  And also strip
location wrappers.

	PR c++/105996

gcc/cp/ChangeLog:

	* typeck.cc (build_ptrmemfunc): Drop 0-offset optimization
	and location wrappers.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/constexpr-pmf3.C: New test.
parent 3fbeff66
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment