Mercurial > hg > xemacs-beta
comparison configure.in @ 2315:e219f63b9c24
[xemacs-hg @ 2004-09-29 15:38:30 by james]
Turn of -Wunused-parameter for g++.
author | james |
---|---|
date | Wed, 29 Sep 2004 15:38:32 +0000 |
parents | e2fdc9035c5b |
children | ecf1ebac70d8 |
comparison
equal
deleted
inserted
replaced
2314:6f40f4d352b6 | 2315:e219f63b9c24 |
---|---|
2057 cflags_warning="-Wall -Wno-switch -Winline -Wmissing-prototypes" | 2057 cflags_warning="-Wall -Wno-switch -Winline -Wmissing-prototypes" |
2058 | 2058 |
2059 dnl Yuck, bad compares have been worth at least 3 crashes! | 2059 dnl Yuck, bad compares have been worth at least 3 crashes! |
2060 cflags_warning="$cflags_warning -Wsign-compare" | 2060 cflags_warning="$cflags_warning -Wsign-compare" |
2061 cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes" | 2061 cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes" |
2062 if test "$__GCC3" = "yes"; then | 2062 test "$__GCC3" = "yes" && cflags_warning="$cflags_warning -Wpacked" |
2063 cflags_warning="$cflags_warning -Wpacked -Wunused-parameter -Wunused-variable" | |
2064 fi | |
2065 dnl glibc is intentionally not `-Wpointer-arith'-clean. | 2063 dnl glibc is intentionally not `-Wpointer-arith'-clean. |
2066 dnl Ulrich Drepper has rejected patches to fix the glibc header files. | 2064 dnl Ulrich Drepper has rejected patches to fix the glibc header files. |
2067 test "$have_glibc" != "yes" && \ | 2065 test "$have_glibc" != "yes" && \ |
2068 cflags_warning="$cflags_warning -Wpointer-arith" | 2066 cflags_warning="$cflags_warning -Wpointer-arith" |
2069 dnl Warning flags that may differ for gcc and g++ (xemacs_compiler) | 2067 dnl Warning flags that may differ for gcc and g++ (xemacs_compiler) |
2071 dnl a local var named `buffer' conflicts with `struct buffer' for | 2069 dnl a local var named `buffer' conflicts with `struct buffer' for |
2072 dnl example. Even with gcc, -Wshadow is questionable because of its | 2070 dnl example. Even with gcc, -Wshadow is questionable because of its |
2073 dnl complaints about parameters with the same names as global functions. | 2071 dnl complaints about parameters with the same names as global functions. |
2074 dnl There is no -Wmissing-declarations under g++. | 2072 dnl There is no -Wmissing-declarations under g++. |
2075 dnl But gcc warns about -Weffc++ in C compiles. | 2073 dnl But gcc warns about -Weffc++ in C compiles. |
2076 test "$xemacs_compiler" = "g++" && \ | 2074 dnl With g++, there is no effective way to use -Wunused-parameter without |
2075 dnl some very ugly code changes. | |
2076 if test "$xemacs_compiler" = "g++"; then | |
2077 xe_cflags_warning="$cflags_warning -Weffc++" | 2077 xe_cflags_warning="$cflags_warning -Weffc++" |
2078 elif test "$__GCC3" = "yes"; then | |
2079 xe_cflags_warning="$cflags_warning -Wunused-parameter" | |
2080 fi | |
2078 cflags_warning="$cflags_warning -Wshadow -Wmissing-declarations" | 2081 cflags_warning="$cflags_warning -Wshadow -Wmissing-declarations" |
2079 dnl **** If more gcc/g++ flags are added, from here on must handle | 2082 dnl **** If more gcc/g++ flags are added, from here on must handle |
2080 dnl **** cflags_warning and xe_cflags_warning in parallel | 2083 dnl **** cflags_warning and xe_cflags_warning in parallel |
2081 elif test "$__ICC" = "yes"; then | 2084 elif test "$__ICC" = "yes"; then |
2082 cflags_warning="-Wall -w1 -we147" | 2085 cflags_warning="-Wall -w1 -we147" |