This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Hi,

On 08/06/2014 05:19 PM, Jason Merrill wrote:
On 08/05/2014 10:48 AM, Paolo Carlini wrote:
+           && (VOID_TYPE_P (TREE_TYPE (type1))
+               || comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (type0)),
+                     TYPE_MAIN_VARIANT (TREE_TYPE (type1)),
+                     COMPARE_BASE | COMPARE_DERIVED))))

Can we drop this now that we're calling composite_pointer_type?
Yes we can, sorry for not investigating that earlier. I only have to tweak a bit the testcase because then in the malformed cases we emit first the permerror and then the -Waddress warning too. I suppose it's Ok because after all those are in most of the cases permerrors and I don't think the additional verbosity should be that common, we are talking about comparing a "null" pointer of the wrong type, not a generic pointer. Otherwise we would have to tweak composite_pointer_type to precisely inform the caller when an actual error was emitted.

Thanks,
Paolo.

/////////////////////

Attachment: patch_43906_5
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]