On Thu, Aug 17, 2023 at 05:37:03PM +0200, Jose E. Marchesi via Gcc-patches wrote: > > > On Thu, 17 Aug 2023, Jose E. Marchesi via Gcc-patches wrote: > > > >> +@opindex Wcompare-distinct-pointer-types > >> +@item -Wcompare-distinct-pointer-types > > > > This @item should say @r{(C and Objective-C only)}, since the option isn't > > implemented for C++. OK with that change. > > Pushed with that change. > Thanks for the prompt review!
I see the following failures: FAIL: gcc.c-torture/compile/pr106537-1.c -Os (test for warnings, line 28) FAIL: gcc.c-torture/compile/pr106537-1.c -Os (test for warnings, line 30) FAIL: gcc.c-torture/compile/pr106537-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for warnings, line 28) FAIL: gcc.c-torture/compile/pr106537-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for warnings, line 30) FAIL: gcc.c-torture/compile/pr106537-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (test for warnings, line 28) FAIL: gcc.c-torture/compile/pr106537-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (test for warnings, line 30) FAIL: gcc.c-torture/compile/pr106537-2.c -O0 (test for warnings, line 26) FAIL: gcc.c-torture/compile/pr106537-2.c -O0 (test for warnings, line 28) FAIL: gcc.c-torture/compile/pr106537-2.c -O1 (test for warnings, line 26) FAIL: gcc.c-torture/compile/pr106537-2.c -O1 (test for warnings, line 28) FAIL: gcc.c-torture/compile/pr106537-2.c -O2 (test for warnings, line 26) FAIL: gcc.c-torture/compile/pr106537-2.c -O2 (test for warnings, line 28) FAIL: gcc.c-torture/compile/pr106537-2.c -O3 -g (test for warnings, line 26) FAIL: gcc.c-torture/compile/pr106537-2.c -O3 -g (test for warnings, line 28) FAIL: gcc.c-torture/compile/pr106537-2.c -Os (test for warnings, line 26) FAIL: gcc.c-torture/compile/pr106537-2.c -Os (test for warnings, line 28) FAIL: gcc.c-torture/compile/pr106537-2.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for warnings, line 26) FAIL: gcc.c-torture/compile/pr106537-2.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for warnings, line 28) FAIL: gcc.c-torture/compile/pr106537-2.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (test for warnings, line 26) FAIL: gcc.c-torture/compile/pr106537-2.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (test for warnings, line 28) The problem is that for ==/!=, when one of the types is void*, build_binary_op goes to the branch attempting to warn about comparing void* with a function pointer, and never gets to the -Wcompare-distinct-pointer-types warning. Marek