Re: [C++ Patch / RFC] PR 38174

2011-10-14 Thread Paolo Carlini
Hi, On 10/13/2011 10:37 PM, Paolo Carlini wrote: + if ((TYPE_PTR_P (type1) && TYPE_PTR_P (type2)) + || (TYPE_PTRMEM_P (type1) && TYPE_PTRMEM_P (type2)) + || TYPE_PTRMEMFUNC_P (type1)) You don't need to check TYPE_PTR_P or TYPE_PTRMEM_P for type2 here (or in the condition above)

Re: [C++ Patch / RFC] PR 38174

2011-10-14 Thread Jason Merrill
On 10/13/2011 10:37 PM, Paolo Carlini wrote: + if ((TYPE_PTR_P (type1) && TYPE_PTR_P (type2)) + || (TYPE_PTRMEM_P (type1) && TYPE_PTRMEM_P (type2)) + || TYPE_PTRMEMFUNC_P (type1)) You don't need to check TYPE_PTR_P or TYPE_PTRMEM_P for type2 here (or in the condition above

[C++ Patch / RFC] PR 38174

2011-10-13 Thread Paolo Carlini
Hi, so, assuming I understood correctly Jason's tips (thanks again for your patience ;) the fix for this pretty old issue seems even simpler than I guessed at triage time, because we already have available composite_pointer_type, doing all the real work. The below passes the testsuite on x86_