Subject: Checking whether C compiler handles -Wenum-compare does not work
From: Lukasz Dorau <[email-masked]>
To: [email-masked]
Date: Tue, 24 Feb 2015 12:02:45 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Checking whether C compiler handles -Wenum-compare does not work:

configure:34007: checking whether C compiler handles -Wenum-compare
configure:34026: gcc -std=gnu99 -o conftest -g -O2  -Wenum-compare
conftest.c  >&5
cc1: warning: command line option "-Wenum-compare" is valid for C++/ObjC++
but not for C
configure:34026: $? = 0
configure:34037: result: yes

Whole config.log is attached.

As a result make fails:
$ make
make  all-recursive
make[1]: Entering directory `/mnt/files/repos/grep'
Making all in po
make[2]: Entering directory `/mnt/files/repos/grep/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/mnt/files/repos/grep/po'
Making all in lib
make[2]: Entering directory `/mnt/files/repos/grep/lib'
make  all-am
make[3]: Entering directory `/mnt/files/repos/grep/lib'
  CC       binary-io.o
cc1: warning: command line option "-Wenum-compare" is valid for C++/ObjC++
but not for C
cc1: warnings being treated as errors
In file included from binary-io.c:3:
binary-io.h:53: error: no previous prototype for 'set_binary_mode'
[-Wmissing-prototypes]
make[3]: *** [binary-io.o] Error 1
make[3]: Leaving directory `/mnt/files/repos/grep/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/files/repos/grep/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/files/repos/grep'
make: *** [all] Error 2

--
Lukasz