Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
3.28k stars 94 forks source link

[BUG] configure script will fail silently with clang-16 #337

Open tastytea opened 1 year ago

tastytea commented 1 year ago

Describe the bug

The module doesn't build with (simulated) clang-16 because ./configure silently fails. Running make afterwards does not produce fzftab.so.

  • Clang 16 (to be released appx. March 2023) will make the following default errors:

    • -Werror=implicit-function-declaration
    • -Werror=implicit-int
    • -Werror=int-conversion (this is in Clang 15, actually)
    • -Werror=incompatible-function-pointer-types (GCC does not have a specific equivalent error, use -Werror=incompatible-pointer-types instead when testing)
  • GCC 14 (to be released appx. May 2024) is likely to do the same.

https://wiki.gentoo.org/wiki/Modern_C_porting#What_changed.3F

I simulated building with clang-16 like this:

% CC=clang \
  CFLAGS="-Werror=implicit-function-declaration \
          -Werror=implicit-int \
          -Werror=incompatible-function-pointer-types" \
  ./configure --disable-gdbm --without-tcsetpgrp
% make

diffing the config.log with clang-15 with the one with simulated clang-16 and greping for '^\+.*error:' shows 64 new errors.

I can make sure:

To Reproduce

Steps to reproduce the behavior:

  1. Run CC=clang CFLAGS="-Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-function-pointer-types" ./configure --disable-gdbm --without-tcsetpgrp in ./modules
  2. Run make
  3. ./Src/aloxaf/fzftab.so does not exist

Expected behavior

./configure uses valid C code.

Environment:

Logs

Additional context