Re: [PATCH] c++: Further fix for get_member_function_from_ptrfunc [PR117259]

2024-10-23 Thread Jakub Jelinek
On Wed, Oct 23, 2024 at 12:27:32PM -0400, Jason Merrill wrote: > On 10/22/24 2:17 PM, Jakub Jelinek wrote: > > The following testcase shows that the previous > > get_member_function_from_ptrfunc > > changes weren't sufficient and we still have cases where > > -fsanitize=undefined with pointers to

Re: [PATCH] c++: Further fix for get_member_function_from_ptrfunc [PR117259]

2024-10-23 Thread Jason Merrill
On 10/23/24 3:07 PM, Jakub Jelinek wrote: On Wed, Oct 23, 2024 at 08:53:36PM +0200, Jakub Jelinek wrote: save_expr has been doing that at least since 1992, likely before that. Though, that 4073 /* Array ref is const/volatile if the array elements are 4074 or if the array is.

Re: [PATCH] c++: Further fix for get_member_function_from_ptrfunc [PR117259]

2024-10-23 Thread Jakub Jelinek
On Wed, Oct 23, 2024 at 08:53:36PM +0200, Jakub Jelinek wrote: > save_expr has been doing that at least since 1992, likely before that. > Though, that > 4073/* Array ref is const/volatile if the array elements are > 4074 or if the array is.. */ > 4075TREE_READONLY (rval)

Re: [PATCH] c++: Further fix for get_member_function_from_ptrfunc [PR117259]

2024-10-23 Thread Jakub Jelinek
On Wed, Oct 23, 2024 at 12:45:53PM -0400, Jason Merrill wrote: > On 10/23/24 12:33 PM, Jakub Jelinek wrote: > > On Wed, Oct 23, 2024 at 12:27:32PM -0400, Jason Merrill wrote: > > > On 10/22/24 2:17 PM, Jakub Jelinek wrote: > > > > The following testcase shows that the previous > > > > get_member_f

Re: [PATCH] c++: Further fix for get_member_function_from_ptrfunc [PR117259]

2024-10-23 Thread Jason Merrill
On 10/23/24 12:33 PM, Jakub Jelinek wrote: On Wed, Oct 23, 2024 at 12:27:32PM -0400, Jason Merrill wrote: On 10/22/24 2:17 PM, Jakub Jelinek wrote: The following testcase shows that the previous get_member_function_from_ptrfunc changes weren't sufficient and we still have cases where -fsanitize

Re: [PATCH] c++: Further fix for get_member_function_from_ptrfunc [PR117259]

2024-10-23 Thread Jason Merrill
On 10/22/24 2:17 PM, Jakub Jelinek wrote: Hi! The following testcase shows that the previous get_member_function_from_ptrfunc changes weren't sufficient and we still have cases where -fsanitize=undefined with pointers to member functions can cause wrong code being generated and related false pos

[PATCH] c++: Further fix for get_member_function_from_ptrfunc [PR117259]

2024-10-22 Thread Jakub Jelinek
Hi! The following testcase shows that the previous get_member_function_from_ptrfunc changes weren't sufficient and we still have cases where -fsanitize=undefined with pointers to member functions can cause wrong code being generated and related false positive warnings. The problem is that save_ex