[Bug libgcc/63801] New: error: templates must have C++ linkage
gcc at ryandesign dot com
gcc-bugzilla@gcc.gnu.org
Mon Nov 10 05:51:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63801
Bug ID: 63801
Summary: error: templates must have C++ linkage
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at ryandesign dot com
Hello, I'm a developer with the MacPorts project. I'm not the maintainer of our
gcc ports, but I am the one who created our gcc5 port and kept it updated until
version 5-20140824. No later snapshot of gcc5 has successfully built for me on
OS X, failing instead with the following message:
ccache /usr/bin/clang++ -arch x86_64 -c -g -DIN_GCC -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-fno-common -DHAVE_CONFIG_H -I. -I.
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/.
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/../include
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/../libcpp/include
-I/opt/local/include -I/opt/local/include -I/opt/local/include
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/../libdecnumber
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/../libdecnumber/dpd
-I../libdecnumber
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/../libbacktrace
-DCLOOG_INT_GMP -I/opt/local/include -DCLOOG_INT_GMP -I/opt/local/include -o
graphite-clast-to-gimple.o -MT graphite-clast-to-gimple.o -MMD -MP -MF
./.deps/graphite-clast-to-gimple.TPo
/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/graphite-clast-to-gimple.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is
deprecated
clang: warning: treating 'cpp-output' input as 'c++-cpp-output' when in C++
mode, this behavior is deprecated
In file included from
/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/graphite-clast-to-gimple.c:36:
In file included from /opt/local/include/isl/val_gmp.h:4:
In file included from /opt/local/include/gmp.h:34:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:89:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:494:1:
error: templates must have C++ linkage
template <bool> struct __static_assert_test;
^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:495:20:
error: explicit specialization of non-template struct '__static_assert_test'
template <> struct __static_assert_test<true> {};
^ ~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:496:1:
error: templates must have C++ linkage
template <unsigned> struct __static_assert_check {};
^~~~~~~~~~~~~~~~~~~
We are using gmp version 6.0.0 and isl version 0.14.
This was with the following OS X, Xcode and clang versions, but similar failure
occurs on earlier versions:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.10.1
BuildVersion: 14B17
$ xcodebuild -version
Xcode 6.1
Build version 6A1052d
$ clang -v
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
$
More information about the Gcc-bugs
mailing list