https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67888
Bug ID: 67888 Summary: Compiling clang 3.7.0 results in is used but never defined Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rodrigc at gcc dot gnu.org Target Milestone: --- Created attachment 36460 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36460&action=edit Module.ii.bz2 Version of GCC: Using built-in specs. COLLECT_GCC=/usr/local/bin/x86_64-portbld-freebsd11.0-g++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-portbld-freebsd11.0/4.9.2/lto-wrapper Target: x86_64-portbld-freebsd11.0 Configured with: ./../gcc-4.9.2/configure --target=x86_64-portbld-freebsd11.0 --disable-nls --enable-languages=c,c++ --without-headers --with-gmp=/usr/local --with-pkgversion='FreeBSD Ports Collection for amd64' --with-system-zlib --with-as=/usr/local/bin/x86_64-freebsd-as --with-ld=/usr/local/bin/x86_64-freebsd-ld --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/ --build=x86_64-portbld-freebsd11.0 Thread model: posix gcc version 4.9.2 (FreeBSD Ports Collection for amd64) System: FreeBSD 11.0-CURRENT #6 r286639 Problem Description: When clang 3.7.0 is compiled with gcc 4.9.2, using this command: /usr/local/bin/x86_64-portbld-freebsd11.0-g++ -save-temps -isystem /usr/obj/opt2/branches/head/tmp/usr/include -L/usr/obj/opt2/branches/head/tmp/usr/lib --sysroot=/usr/obj/opt2/branches/head/tmp -B/usr/local/x86_64-freebsd/bin/ -I/usr/obj/opt2/branches/head/tmp/usr/include/c++/v1 -std=gnu++11 -L/usr/obj/opt2/branches/head/tmp/../lib/libc++ --sysroot=/usr/obj/opt2/branches/head/tmp -B/usr/local/x86_64-freebsd/bin/ -O2 -pipe -I/opt2/branches/head/lib/clang/libclangbasic/../../../contrib/llvm/include -I/opt2/branches/head/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/include -I/opt2/branches/head/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic -I. -I/opt2/branches/head/lib/clang/libclangbasic/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_STATIC_ANALYZER -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.0\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.0\" -DDEFAULT_SYSROOT=\"\" -fstack-protector-strong -std=c++11 -fno-exceptions -fno-rtti -c /opt2/branches/head/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/Module.cpp -o Module.o the following error is observed: In file included from /opt2/branches/head/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h:22:0, from /opt2/branches/head/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/include/clang/Basic/Module.h:18, from /opt2/branches/head/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/Module.cpp:15: /usr/obj/opt2/branches/head/tmp/usr/include/c++/v1/functional:1322:17: error: '_Rp std::__1::__function::__base<_Rp(_ArgTypes ...)>::operator()(_ArgTypes&& ...) [with _Rp = void; _ArgTypes = {clang::VisibleModuleSet::setVisible(clang::Module*, clang::SourceLocation, clang::VisibleModuleSet::VisibleCallback, clang::VisibleModuleSet::ConflictCallback)::Visiting}]', declared using local type 'clang::VisibleModuleSet::setVisible(clang::Module*, clang::SourceLocation, clang::VisibleModuleSet::VisibleCallback, clang::VisibleModuleSet::ConflictCallback)::Visiting', is used but never defined [-fpermissive] virtual _Rp operator()(_ArgTypes&& ...) = 0;