On Thu, 17 Dec 2015, Paolo Carlini wrote:
Hi,
On 16/12/2015 23:10, Patrick Palka wrote:
gcc/cp/ChangeLog:
PR c++/59878
* typeck.c (convert_for_initialization): Don't perform an early
decaying conversion if converting to a class type.
gcc/testsuite/ChangeLog:
PR c++/59878
Hi,
On 16/12/2015 23:10, Patrick Palka wrote:
gcc/cp/ChangeLog:
PR c++/59878
* typeck.c (convert_for_initialization): Don't perform an early
decaying conversion if converting to a class type.
gcc/testsuite/ChangeLog:
PR c++/59878
* g++.dg/conversion/pr59878.C: New test.
Ni
OK, thanks.
Jason
On Wed, 16 Dec 2015, Jason Merrill wrote:
On 12/15/2015 04:16 PM, Patrick Palka wrote:
+ if (MAYBE_CLASS_TYPE_P (type))
+;
What does this patch do with conversion to const reference to class? I think
we want to check MAYBE_CLASS_TYPE_P (non_reference (type)) here.
That makes sense.
On 12/15/2015 04:16 PM, Patrick Palka wrote:
+ if (MAYBE_CLASS_TYPE_P (type))
+;
What does this patch do with conversion to const reference to class? I
think we want to check MAYBE_CLASS_TYPE_P (non_reference (type)) here.
Jason
This patch just makes convert_for_initialization() to avoid eagerly
decaying an array, function, etc if the type we're converting to is a
class type, so that the correct conversion constructor could be later be
selected in perform_implicit_conversion_flags().
Bootstrap + regtest in progress on x86