Opened 6 years ago
Closed 6 years ago
#879 closed defect (fixed)
"unknown warning option" when compiling with clang
Reported by: | Algunenano | Owned by: | strk |
---|---|---|---|
Priority: | minor | Milestone: | 3.6.3 |
Component: | Build/Install | Version: | main |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
By default clang (testing 6.0.0) does not return an error with unavailable flags, just a warning:
configure:18175: checking whether C++ compiler accepts -Wsuggest-override configure:18194: clang++ -c -g -O2 -Wsuggest-override -D_FORTIFY_SOURCE=2 conftest.cpp >&5 warning: unknown warning option '-Wsuggest-override'; did you mean '-Wshift-overflow'? [-Wunknown-warning-option] 1 warning generated. configure:18194: $? = 0 configure:18202: result: yes configure:18210: checking whether C++ compiler accepts -Wmissing-override configure:18229: clang++ -c -g -O2 -Wmissing-override -D_FORTIFY_SOURCE=2 conftest.cpp >&5 warning: unknown warning option '-Wmissing-override'; did you mean '-Wmissing-noescape'? [-Wunknown-warning-option] 1 warning generated. configure:18229: $? = 0
Which causes the build to spit warnings constantly:
libtool: compile: clang++ -DHAVE_CONFIG_H -I. -I../../../include -I../../../include/geos -I../../../include -D_FORTIFY_SOURCE=2 -DGEOS_INLINE -Wsuggest-override -Wmissing-override -pedantic -Wall -Wno-long-long -DUSE_UNSTABLE_GEOS_CPP_API -g -O2 -MT Node.lo -MD -MP -MF .deps/Node.Tpo -c Node.cpp -fPIC -DPIC -o .libs/Node.o warning: unknown warning option '-Wsuggest-override'; did you mean '-Wshift-overflow'? [-Wunknown-warning-option] warning: unknown warning option '-Wmissing-override'; did you mean '-Wmissing-noescape'? [-Wunknown-warning-option]
Can be fixed by forcing the check to be done with -Werror
too. PR in https://github.com/OSGeo/geos/pull/104
Note:
See TracTickets
for help on using tickets.
Merged as https://github.com/OSGeo/geos/commit/abbcf604cd5bb2463b3d9b17e086879495ffa671