• Home
  • Raw
  • Download

Lines Matching +full:- +full:wno +full:- +full:implicit +full:- +full:function +full:- +full:declaration

8 # Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
28 dnl -------------------------------------------------
69 *** mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/
77 dnl -------------------------------------------------
89 dnl IBM's almost-compatible clang version
96 fullclangver=`$CC -v 2>&1 | grep version`
97 …clangver | grep "based on LLVM " | "$SED" 's/.*(based on LLVM \(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*)/\1…
98 if test -z "$clangver"; then
103 clangver=`echo $fullclangver | "$SED" 's/.*version \(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*/\1/'`
106 clangvhi=`echo $clangver | cut -d . -f1`
107 clangvlo=`echo $clangver | cut -d . -f2`
109 flags_dbg_all="-g -g0 -g1 -g2 -g3"
110 flags_dbg_all="$flags_dbg_all -ggdb"
111 flags_dbg_all="$flags_dbg_all -gstabs"
112 flags_dbg_all="$flags_dbg_all -gstabs+"
113 flags_dbg_all="$flags_dbg_all -gcoff"
114 flags_dbg_all="$flags_dbg_all -gxcoff"
115 flags_dbg_all="$flags_dbg_all -gdwarf-2"
116 flags_dbg_all="$flags_dbg_all -gvms"
117 flags_dbg_yes="-g"
119 flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
120 flags_opt_yes="-Os"
121 flags_opt_off="-O0"
129 dnl -------------------------------------------------
140 flags_dbg_all="-g -g0 -g1 -g2 -g3"
141 flags_dbg_yes="-g2"
143 flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
144 flags_opt_yes="-O1"
145 flags_opt_off="-O0"
153 dnl -------------------------------------------------
165 gccver=`$CC -dumpversion`
166 gccvhi=`echo $gccver | cut -d . -f1`
167 gccvlo=`echo $gccver | cut -d . -f2`
169 flags_dbg_all="-g -g0 -g1 -g2 -g3"
170 flags_dbg_all="$flags_dbg_all -ggdb"
171 flags_dbg_all="$flags_dbg_all -gstabs"
172 flags_dbg_all="$flags_dbg_all -gstabs+"
173 flags_dbg_all="$flags_dbg_all -gcoff"
174 flags_dbg_all="$flags_dbg_all -gxcoff"
175 flags_dbg_all="$flags_dbg_all -gdwarf-2"
176 flags_dbg_all="$flags_dbg_all -gvms"
177 flags_dbg_yes="-g"
179 flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast"
180 flags_opt_yes="-O2"
181 flags_opt_off="-O0"
190 dnl -------------------------------------------------
191 dnl Verify if compiler being used is HP-UX C.
194 AC_MSG_CHECKING([if compiler is HP-UX C])
199 flags_dbg_all="-g -s"
200 flags_dbg_yes="-g"
201 flags_dbg_off="-s"
202 flags_opt_all="-O +O0 +O1 +O2 +O3 +O4"
212 dnl -------------------------------------------------
221 flags_dbg_all="-g -g0 -g1 -g2 -g3"
222 flags_dbg_yes="-g"
224 flags_opt_all="-O -O0 -O1 -O2 -O3 -O4 -O5"
225 flags_opt_all="$flags_opt_all -qnooptimize"
226 flags_opt_all="$flags_opt_all -qoptimize=0"
227 flags_opt_all="$flags_opt_all -qoptimize=1"
228 flags_opt_all="$flags_opt_all -qoptimize=2"
229 flags_opt_all="$flags_opt_all -qoptimize=3"
230 flags_opt_all="$flags_opt_all -qoptimize=4"
231 flags_opt_all="$flags_opt_all -qoptimize=5"
232 flags_opt_yes="-O2"
233 flags_opt_off="-qnooptimize"
242 dnl -------------------------------------------------
255 flags_dbg_all="-g -g0"
256 flags_dbg_yes="-g"
258 flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
259 flags_opt_yes="-O2"
260 flags_opt_off="-O0"
263 flags_dbg_all="/ZI /Zi /zI /zi /ZD /Zd /zD /zd /Z7 /z7 /Oy /Oy-"
271 flags_dbg_yes="/Zi /Oy-"
272 flags_dbg_off="/debug:none /Oy-"
273 flags_opt_all="/O /O0 /O1 /O2 /O3 /Od /Og /Og- /Oi /Oi-"
284 dnl -------------------------------------------------
293 flags_dbg_all="-g"
294 flags_dbg_yes="-g"
306 dnl -------------------------------------------------
319 flags_dbg_all="-g -g0 -g1 -g2 -g3"
320 flags_dbg_yes="-g"
322 flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
323 flags_opt_yes="-O2"
324 flags_opt_off="-O0"
332 dnl -------------------------------------------------
346 flags_dbg_all="-g -g0 -g1 -g2 -g3"
347 flags_dbg_yes="-g"
349 flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
350 flags_opt_yes="-O2"
351 flags_opt_off="-O0"
359 dnl -------------------------------------------------
368 flags_dbg_all="-g -s"
369 flags_dbg_yes="-g"
370 flags_dbg_off="-s"
371 flags_opt_all="-O -xO -xO1 -xO2 -xO3 -xO4 -xO5"
372 flags_opt_yes="-xO2"
381 dnl -------------------------------------------------
390 flags_dbg_all="-g -b"
391 flags_dbg_yes="-g"
403 dnl -------------------------------------------------
414 flags_dbg_all="-g1 -g1+ -g2 -g3"
415 flags_dbg_yes="-g2"
417 flags_opt_all="-O0 -O1 -O2 -O3"
418 flags_opt_yes="-O2"
419 flags_opt_off="-O0"
436 dnl -------------------------------------------------
452 -I*)
458 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
459 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
467 -I*)
473 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
474 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
482 dnl CURL_COMPILER_WORKS_IFELSE ([ACTION-IF-WORKS], [ACTION-IF-NOT-WORKS])
483 dnl -------------------------------------------------
502 sed 's/^/cc-fail: /' conftest.err >&6
518 sed 's/^/link-fail: /' conftest.err >&6
522 dnl only do runtime verification when not cross-compiling
539 echo "run-fail: test program exited with status $ac_status" >&6
553 dnl -------------------------------------------------
579 dnl warn about compile-time arguments used during link-time, like
580 dnl -O and -g and -pedantic.
581 tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments"
587 tmp_CFLAGS="$tmp_CFLAGS -std1"
589 tmp_CFLAGS="$tmp_CFLAGS -noansi_alias"
590 dnl Generate warnings for missing function prototypes
591 tmp_CFLAGS="$tmp_CFLAGS -warnprotos"
593 tmp_CFLAGS="$tmp_CFLAGS -msg_fatal toofewargs,toomanyargs"
598 dnl turn implicit-function-declaration warning into error,
600 if test "$compiler_num" -ge "295"; then
601 tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
607 dnl Disallow run-time dereferencing of null pointers
608 tmp_CFLAGS="$tmp_CFLAGS -z"
617 dnl Ensure that compiler optimizations are always thread-safe.
618 tmp_CPPFLAGS="$tmp_CPPFLAGS -qthreaded"
623 tmp_CPPFLAGS="$tmp_CPPFLAGS -qnoansialias"
626 tmp_CPPFLAGS="$tmp_CPPFLAGS -qhalt=e"
633 tmp_CFLAGS="$tmp_CFLAGS -std=gnu89"
635 dnl #140: too many arguments in function call
636 dnl #147: declaration is incompatible with 'previous one'
637 dnl #165: too few arguments in function call
638 dnl #266: function declared implicitly
639 tmp_CPPFLAGS="$tmp_CPPFLAGS -we140,147,165,266"
644 tmp_CPPFLAGS="$tmp_CPPFLAGS -wd279,981,1469"
655 dnl Disallow run-time dereferencing of null pointers
656 tmp_CFLAGS="$tmp_CFLAGS -n"
700 if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
723 dnl -------------------------------------------------
777 dnl -------------------------------------------------
859 dnl -------------------------------------------------
880 tmp_CFLAGS="$tmp_CFLAGS -pedantic"
881 tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
882 tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings"
883 tmp_CFLAGS="$tmp_CFLAGS -Wshadow"
884 tmp_CFLAGS="$tmp_CFLAGS -Winline -Wnested-externs"
885 tmp_CFLAGS="$tmp_CFLAGS -Wmissing-declarations"
886 tmp_CFLAGS="$tmp_CFLAGS -Wmissing-prototypes"
887 tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
888 tmp_CFLAGS="$tmp_CFLAGS -Wfloat-equal"
889 tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar -Wsign-compare"
890 tmp_CFLAGS="$tmp_CFLAGS -Wundef"
891 tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
892 tmp_CFLAGS="$tmp_CFLAGS -Wendif-labels -Wstrict-prototypes"
893 tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement"
894 tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"
895 tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
896 tmp_CFLAGS="$tmp_CFLAGS -Wshorten-64-to-32"
899 if test "$compiler_num" -ge "101"; then
900 tmp_CFLAGS="$tmp_CFLAGS -Wunused"
904 if test "$compiler_num" -ge "208"; then
905 tmp_CFLAGS="$tmp_CFLAGS -Wvla"
909 if test "$compiler_num" -ge "209"; then
910 tmp_CFLAGS="$tmp_CFLAGS -Wshift-sign-overflow"
914 if test "$compiler_num" -ge "302"; then
917 dnl skip missing-variable-declarations warnings for cygwin and
921 tmp_CFLAGS="$tmp_CFLAGS -Wmissing-variable-declarations"
927 if test "$compiler_num" -ge "306"; then
928 tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"
932 if test "$compiler_num" -ge "309"; then
933 tmp_CFLAGS="$tmp_CFLAGS -Wcomma"
936 if test "$compiler_num" -lt "400"; then
937 tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs"
947 tmp_CFLAGS="$tmp_CFLAGS -msg_enable level3"
955 dnl Do not enable -pedantic when cross-compiling with a gcc older
958 test "$compiler_num" -ge "300"; then
959 tmp_CFLAGS="$tmp_CFLAGS -pedantic"
963 tmp_CFLAGS="$tmp_CFLAGS -Wall -W"
966 if test "$compiler_num" -ge "104"; then
967 tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings"
968 dnl If not cross-compiling with a gcc older than 3.0
970 test "$compiler_num" -ge "300"; then
971 tmp_CFLAGS="$tmp_CFLAGS -Wunused -Wshadow"
976 if test "$compiler_num" -ge "207"; then
977 tmp_CFLAGS="$tmp_CFLAGS -Winline -Wnested-externs"
978 dnl If not cross-compiling with a gcc older than 3.0
980 test "$compiler_num" -ge "300"; then
981 tmp_CFLAGS="$tmp_CFLAGS -Wmissing-declarations"
982 tmp_CFLAGS="$tmp_CFLAGS -Wmissing-prototypes"
987 if test "$compiler_num" -ge "295"; then
988 tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
989 tmp_CFLAGS="$tmp_CFLAGS -Wbad-function-cast"
993 if test "$compiler_num" -ge "296"; then
994 tmp_CFLAGS="$tmp_CFLAGS -Wfloat-equal"
995 tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar -Wsign-compare"
996 dnl -Wundef used only if gcc is 2.96 or later since we get
999 tmp_CFLAGS="$tmp_CFLAGS -Wundef"
1003 if test "$compiler_num" -ge "297"; then
1004 tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
1008 if test "$compiler_num" -ge "300"; then
1009 dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on
1010 dnl on i686-Linux as it gives us heaps with false positives.
1017 if test "$compiler_num" -ge "303"; then
1018 tmp_CFLAGS="$tmp_CFLAGS -Wendif-labels -Wstrict-prototypes"
1022 if test "$compiler_num" -ge "304"; then
1023 tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement"
1024 tmp_CFLAGS="$tmp_CFLAGS -Wold-style-definition"
1028 if test "$compiler_num" -ge "400"; then
1029 tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
1033 if test "$compiler_num" -ge "402"; then
1034 tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"
1038 if test "$compiler_num" -ge "403"; then
1039 tmp_CFLAGS="$tmp_CFLAGS -Wtype-limits -Wold-style-declaration"
1040 tmp_CFLAGS="$tmp_CFLAGS -Wmissing-parameter-type -Wempty-body"
1041 tmp_CFLAGS="$tmp_CFLAGS -Wclobbered -Wignored-qualifiers"
1042 tmp_CFLAGS="$tmp_CFLAGS -Wconversion -Wno-sign-conversion -Wvla"
1043 dnl required for -Warray-bounds, included in -Wall
1044 tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
1048 if test "$compiler_num" -ge "405"; then
1051 tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
1056 if test "$compiler_num" -ge "406"; then
1057 tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"
1061 if test "$compiler_num" -ge "408"; then
1062 tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
1066 if test "$compiler_num" -ge "500"; then
1067 tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2"
1071 if test "$compiler_num" -ge "600"; then
1072 tmp_CFLAGS="$tmp_CFLAGS -Wshift-negative-value"
1073 tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2"
1074 tmp_CFLAGS="$tmp_CFLAGS -Wnull-dereference -fdelete-null-pointer-checks"
1075 tmp_CFLAGS="$tmp_CFLAGS -Wduplicated-cond"
1076 tmp_CFLAGS="$tmp_CFLAGS -Wunused-const-variable"
1080 if test "$compiler_num" -ge "700"; then
1081 tmp_CFLAGS="$tmp_CFLAGS -Wduplicated-branches"
1082 tmp_CFLAGS="$tmp_CFLAGS -Wrestrict"
1083 tmp_CFLAGS="$tmp_CFLAGS -Walloc-zero"
1084 tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
1085 tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
1086 tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
1092 if test "$compiler_num" -ge "300"; then
1093 tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
1095 dnl When cross-compiling with a gcc older than 3.0, disable
1098 if test "$compiler_num" -ge "104"; then
1100 tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow"
1102 if test "$compiler_num" -ge "207"; then
1104 tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-declarations"
1105 tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-prototypes"
1128 if test "$compiler_num" -gt "600"; then
1130 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wall -w2"
1131 dnl Perform extra compile-time code checking
1132 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcheck"
1134 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcomment"
1136 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wdeprecated"
1138 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wmissing-prototypes"
1139 dnl Enable warnings for 64-bit portability issues
1140 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wp64"
1142 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wpointer-arith"
1143 dnl Check for function return typw issues
1144 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wreturn-type"
1146 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wshadow"
1148 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wuninitialized"
1149 dnl Warn if a declared function is not used
1150 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wunused-function"
1154 tmp_CFLAGS="$tmp_CFLAGS -fno-omit-frame-pointer"
1156 tmp_CFLAGS="$tmp_CFLAGS -fno-strict-aliasing"
1157 dnl Value-safe optimizations on floating-point data
1158 tmp_CFLAGS="$tmp_CFLAGS -fp-model precise"
1160 if test "$compiler_num" -ge "1000"; then
1162 tmp_CFLAGS="$tmp_CFLAGS -vec-report0"
1175 dnl Highest warning level is double -A, next is single -A.
1186 dnl Perform stricter semantic and lint-like checks
1187 tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
1194 dnl Perform stricter semantic and lint-like checks
1195 tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
1198 tmp_CFLAGS="$tmp_CFLAGS -woff 1209"
1205 dnl Perform stricter semantic and lint-like checks
1206 tmp_CFLAGS="$tmp_CFLAGS -v"
1214 tmp_CFLAGS="$tmp_CFLAGS -Wall"
1216 tmp_CFLAGS="$tmp_CFLAGS -Wwrite-strings"
1218 tmp_CFLAGS="$tmp_CFLAGS -Wunsupported"
1226 tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
1241 if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
1264 dnl -------------------------------------------------
1265 dnl Declares a shell function squeeze() which removes
1273 if test -z "$_sqz_result"; then
1286 dnl -------------------------------------------------
1288 dnl option, and other additional configure pre-requisites.
1332 dnl -------------------------------------------------
1354 dnl -------------------------------------------------
1365 typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
1379 dnl -------------------------------------------------
1381 dnl size of a struct member, struct which is a function
1382 dnl result, as a compilation-time condition inside the
1397 typedef char good_t1[sizeof(myfunc().mi) == sizeof(int) ? 1 : -1 ];
1398 typedef char good_t2[sizeof(myfunc().mc) == sizeof(char) ? 1 : -1 ];
1407 sed 's/^/cc-src: /' conftest.$ac_ext >&6
1408 sed 's/^/cc-err: /' conftest.err >&6
1419 typedef char bad_t1[sizeof(myfunc().mi) != sizeof(int) ? 1 : -1 ];
1420 typedef char bad_t2[sizeof(myfunc().mc) != sizeof(char) ? 1 : -1 ];
1441 dnl -------------------------------------------------
1457 dnl All versions of clang support -fvisibility=
1459 tmp_CFLAGS="-fvisibility=hidden"
1464 if test "$compiler_num" -ge "304"; then
1465 if $CC --help --verbose 2>/dev/null | grep fvisibility= >/dev/null ; then
1467 tmp_CFLAGS="-fvisibility=hidden"
1474 if test "$compiler_num" -ge "900"; then
1475 if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
1477 CFLAGS="$CFLAGS -fvisibility=hidden"
1486 tmp_CFLAGS="-fvisibility=hidden"
1494 if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
1496 tmp_CFLAGS="-xldscope=hidden"
1523 if test -f conftest.err; then
1525 if test "$?" -eq "0"; then
1532 sed 's/^/cc-src: /' conftest.$ac_ext >&6
1533 sed 's/^/cc-err: /' conftest.err >&6
1549 dnl -------------------------------------------------
1557 AC_MSG_CHECKING([if compiler halts on function prototype mismatch])
1577 AC_MSG_ERROR([compiler does not halt on function prototype mismatch.])
1585 dnl -------------------------------------------------
1605 dnl [ACTION-IF-MATCH], [ACTION-IF-NOT-MATCH])
1606 dnl -------------------------------------------------
1622 dnl -------------------------------------------------