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

Change History (1)

comment:1 by Algunenano, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.