Re: [PATCH] optc-save-gen.awk: adjust generated array compare

2022-09-08 Thread Jason Merrill via Gcc-patches
On 9/8/22 14:01, Martin Liška wrote: On 9/8/22 18:23, Jason Merrill wrote: It seems to me that the warning is pointing out that comparing the address of the array is nonsensical, and we should remove it and just have the memcmp. Yes, thanks for the pointer. We should always compare the array

Re: [PATCH] optc-save-gen.awk: adjust generated array compare

2022-09-08 Thread Martin Liška
On 9/8/22 18:23, Jason Merrill wrote: > It seems to me that the warning is pointing out that comparing the address of > the array is nonsensical, and we should remove it and just have the memcmp. Yes, thanks for the pointer. We should always compare the array types with memcmp. Ready to be inst

Re: [PATCH] optc-save-gen.awk: adjust generated array compare

2022-09-08 Thread Jason Merrill via Gcc-patches
On 9/8/22 11:29, Chung-Lin Tang wrote: Hi Joseph, Jan-Benedict reported a build-bot error for the nios2 port under --enable-werror-always: options-save.cc: In function 'bool cl_target_option_eq(const cl_target_option*, const cl_target_option*)': options-save.cc:9291:38: error: comparison betwe

[PATCH] optc-save-gen.awk: adjust generated array compare

2022-09-08 Thread Chung-Lin Tang
Hi Joseph, Jan-Benedict reported a build-bot error for the nios2 port under --enable-werror-always: options-save.cc: In function 'bool cl_target_option_eq(const cl_target_option*, const cl_target_option*)': options-save.cc:9291:38: error: comparison between two arrays [-Werror=array-compare] 9