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.


-- 
           Summary: Erroneous error message using gcc-4.3.0 when signedness
                    warning thrown
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tj at castaglia dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35961

Reply via email to