Re: [PATCH RFA] -Wdangling-pointer: fix MEM_REF handling [PR109514]

2023-04-14 Thread Jason Merrill via Gcc-patches
On 4/14/23 21:22, Jeff Law wrote: On 4/14/23 17:42, Jason Merrill via Gcc-patches wrote: Tested x86_64-pc-linux-gnu, ok for trunk? -- 8< -- Here we hit the MEM_REF case, with its arg an ADDR_EXPR, but had no handling for that and wrongly assumed it would be a reference to a local variable.

Re: [PATCH RFA] -Wdangling-pointer: fix MEM_REF handling [PR109514]

2023-04-14 Thread Jeff Law via Gcc-patches
On 4/14/23 17:42, Jason Merrill via Gcc-patches wrote: Tested x86_64-pc-linux-gnu, ok for trunk? -- 8< -- Here we hit the MEM_REF case, with its arg an ADDR_EXPR, but had no handling for that and wrongly assumed it would be a reference to a local variable. This patch overhauls the logic for

[PATCH RFA] -Wdangling-pointer: fix MEM_REF handling [PR109514]

2023-04-14 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, ok for trunk? -- 8< -- Here we hit the MEM_REF case, with its arg an ADDR_EXPR, but had no handling for that and wrongly assumed it would be a reference to a local variable. This patch overhauls the logic for deciding whether the target is something to warn about so th