When compiling the recent proftpd-1.3.2rc1 source code using gcc-4.3.0, a user reported a problem where gcc reports a problem with the -Wno-long-double option: gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I/usr/include/mysql -O2 -Wall -Wno-long-double -c mod_sql.c mod_sql.c: In function 'check_auth_openssl': mod_sql.c:685: warning: pointer targets in passing argument 3 of 'EVP_DigestFinal' differ in signedness mod_sql.c:688: warning: pointer targets in passing argument 1 of 'EVP_EncodeBlock' differ in signedness At top level: cc1: error: unrecognized command line option "-Wno-long-double" make[1]: *** [mod_sql.o] Error 1 However, I verified that gcc-4.3.0 does in fact support -Wno-long-double, using: # echo 'void f(){}' > conftest.c # gcc -c -Wno-long-double conftest.c 2>&1 # echo $? 0 So the error about "-Wno-long-double" appears to be misleading. In fact, a fuller output from using gcc-4.3.0 for the proftpd-1.3.2rc1 source code shows several successful gcc invocations with that option: flecha:/usr/local/src/proftpd/proftpd-1.3.2rc1# make echo \#define BUILD_STAMP \"`date`\" >include/buildstamp.h cd lib/ && make lib make[1]: Entering directory `/usr/local/src/proftpd/proftpd-1.3.2rc1/lib' gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I/usr/include/mysql -O2 -Wall -Wno-long-double -c pr_fnmatch.c gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I/usr/include/mysql -O2 -Wall -Wno-long-double -c sstrncpy.c gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I/usr/include/mysql -O2 -Wall -Wno-long-double -c strsep.c gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I/usr/include/mysql -O2 -Wall -Wno-long-double -c vsnprintf.c gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I/usr/include/mysql -O2 -Wall -Wno-long-double -c glibc-glob.c ... gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I/usr/include/mysql -O2 -Wall -Wno-long-double -c mod_ident.c gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I/usr/include/mysql -O2 -Wall -Wno-long-double -c mod_auth_pam.c gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I/usr/include/mysql -O2 -Wall -Wno-long-double -c mod_sql.c mod_sql.c: In function 'check_auth_openssl': mod_sql.c:685: warning: pointer targets in passing argument 3 of 'EVP_DigestFinal' differ in signedness mod_sql.c:688: warning: pointer targets in passing argument 1 of 'EVP_EncodeBlock' differ in signedness At top level: cc1: error: unrecognized command line option "-Wno-long-double" I suspect that the root problem was the warning about the signedness discrepancy, and not the -Wno-long-double option at all. For comparison, using gcc-4.2 works.
This is expected behavior. We no longer error out about an unkown warning option unless there is an error/warning already.
What was the reasoning behind this change in behavior? It violates the principle of least surprise, and will cause problems for e.g. configure scripts which use simple tests to determine whether the system's compiler accepts a particular command-line option.
(In reply to comment #2) > What was the reasoning behind this change in behavior? See PR 28322. *** This bug has been marked as a duplicate of 28322 ***