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

2015-02-03 Thread Jason Merrill
On 02/03/2015 11:14 AM, Paolo Carlini wrote: + /* Avoid -Waddress warnings (c++/64877). */ + TREE_NO_WARNING (pfn0) = 1; I'd check for ADDR_EXPR before doing this; OK with that change. Jason

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

2015-02-03 Thread Paolo Carlini
Hi, On 02/03/2015 03:19 PM, Jason Merrill wrote: On 02/03/2015 05:45 AM, Paolo Carlini wrote: + if (TREE_CODE (pfn0) != ADDR_EXPR + || !decl_with_nonnull_addr_p (TREE_OPERAND (pfn0, 0))) I don't like duplicating the logic for when we might know the pfn is non-null; that see

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

2015-02-03 Thread Jason Merrill
On 02/03/2015 05:45 AM, Paolo Carlini wrote: + if (TREE_CODE (pfn0) != ADDR_EXPR + || !decl_with_nonnull_addr_p (TREE_OPERAND (pfn0, 0))) I don't like duplicating the logic for when we might know the pfn is non-null; that seems fragile. I'd rather go with the tf_no